-
1. Re: JBoss-EJB3.0-Cascade delete doesn't work!
starksm64 Oct 16, 2005 8:03 PM (in response to jbosschecker)Moved to the ejb3 forum.
-
2. APPENDIX: JBoss-EJB3.0-Cascade delete doesn't work!
jbosschecker Oct 16, 2005 8:36 PM (in response to jbosschecker)APPENDIX:
It works fine with
@OneToMany (cascade = CascadeType.REMOVE, mappedBy="order")
but not with
@OneToMany (cascade = CascadeType.ALL, mappedBy="order")
Even though, CascadeType.ALL contains REMOVE in itself! -
3. Re: APPENDIX: JBoss-EJB3.0-Cascade delete doesn't work!
jbosschecker Oct 16, 2005 8:56 PM (in response to jbosschecker)Sorry! I did a mistake! It does not work neither with
CascadeType.REMOVE nor with CascadeType.ALL!! -
4. Re: JBoss-EJB3.0-Cascade delete doesn't work!
jbosschecker Oct 18, 2005 3:03 AM (in response to jbosschecker)And once again, I have found the reason myself!!
It has been a bug in the last version of JBOSS AS.
Sea the release notes of jboss 4.0.3 :
"[ JBAS-51 ] bug in cascade-delete with relationships in Jboss CMP " -
5. Re: JBoss-EJB3.0-Cascade delete doesn't work!
epbernard Oct 20, 2005 8:06 PM (in response to jbosschecker)EJB3 entities does not use the CMP engine, so the bug cannot be related
-
6. Re: JBoss-EJB3.0-Cascade delete doesn't work!
jbosschecker Oct 21, 2005 10:26 AM (in response to jbosschecker)Hi Emanuel,
would you - please - explain it a little bit more precise.
I do not understand that.
I thought, that EJB 3.0 entities do even use the CMP engine.
I have installed the new jboss release (4.0.3 RC2) but the problem is still there!
please help me to understand that. -
7. Re: JBoss-EJB3.0-Cascade delete doesn't work!
tonylai Oct 27, 2005 9:40 PM (in response to jbosschecker)Me too, with the same problem on SQL Server for the formal release version(4.0.3). Do you try to delete an object from the list of orderDetails and save the order? Also, the deleted object of oderDetails was not deleted from the database.
-
8. Re: JBoss-EJB3.0-Cascade delete doesn't work!
jbosschecker Oct 27, 2005 10:17 PM (in response to jbosschecker)Yes Its the same to me. I have to delete the orderdetails by hand!
Maybe its an issue of mysql? -
9. Re: JBoss-EJB3.0-Cascade delete doesn't work!
epbernard Oct 28, 2005 4:47 PM (in response to jbosschecker)"jbossChecker" wrote:
Hi Emanuel,
would you - please - explain it a little bit more precise.
I do not understand that.
I thought, that EJB 3.0 entities do even use the CMP engine.
I have installed the new jboss release (4.0.3 RC2) but the problem is still there!
please help me to understand that.
EJB3 use Hibernate
EJB2 use the CMP engine
2 different base code -
10. Re: JBoss-EJB3.0-Cascade delete doesn't work!
epbernard Oct 28, 2005 4:48 PM (in response to jbosschecker)"tonylai" wrote:
Me too, with the same problem on SQL Server for the formal release version(4.0.3). Do you try to delete an object from the list of orderDetails and save the order? Also, the deleted object of oderDetails was not deleted from the database.
removing an object from a collection does not suppress this object unless you set DELETE_ORPHAN check the doc for more info