[jboss-user] [EJB 3.0] - Re: Bidirectional Cascade

waynebaylor do-not-reply at jboss.com
Sun Jun 24 09:18:22 EDT 2007


The cascade setting will only work in one direction, so if you put it on the OneToMany relationship you can remove entities from the collection without fear of deleting the parent.

As for the second question, if you have CascadeType.ALL set, then you won't be able to set the ManyToOne side because it will be deleted when the other side is deleted.

Hope that helps :)  

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057183



More information about the jboss-user mailing list