Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [EJB 3.0] - Re: what can be done for not real remove

scott.stark@jboss.org

2007-07-11


i agree, if you have set CascadeType.ALL or CascadeType.REMOVE on the "phones" collection, then when you call
person.getPhones().remove(phone)
the phone will be removed from the db.

if you only have CascadeType.PERSIST and/or CascadeType.MERGE, then only the "link" from person to that phone will be deleted--the phone entity will still be in the db.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063064#4063064

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063064
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.