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

thepriz do-not-reply at jboss.com
Sun Jun 24 00:14:37 EDT 2007


When you put declare a bidirectional relationship in a OneToMany and ManyToOne relationship and put a cascade=CascadeType.ALL on the OneToMany declaration is the cascade in both directions or only on the OneToMany relationship? In other words if I have a airplane with passangers and I remove a passenger will it delete the airplane?

And how do I get it to set a ManyToOne relationship null if the otherside is deleted?

I have been working with Cascades but I just can't seem to get it to work right.

Thanks in advance,
Dennis Przybyla

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

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



More information about the jboss-user mailing list