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

waynebaylor do-not-reply at jboss.com
Wed Jul 11 11:42:53 EDT 2007


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



More information about the jboss-user mailing list