[jboss-user] [EJB 3.0] - Re: Working example por OneToMany cascade remove?

rjstanford do-not-reply at jboss.com
Tue Oct 2 17:14:59 EDT 2007


So is it a fair statement to say that delete cascading does not and will not work on OneToMany relationships?  How inconvenient.

We're using a stateful session bean (Seam) which allows us to keep changing the object model until the user is ready to either a) save or b) cancel.  On a cancel its easy - we just walk away from everything.  On a save, our goal was to simply end the conversation in the default manner, which has Hibernate flush all of the changes.

It sounds like we're going to have to keep track of the before/after state, descend through all of the OneToManys, to comparisons, and manually handle everything.  It seems odd that CascadeType.REMOVE doesn't do this, since it certainly could follow the same logic - that's why I'm still hoping that we're missing some setting somewhere...?

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

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



More information about the jboss-user mailing list