[jboss-user] [EJB 3.0] - Re: deleting entities from a Collection
aberezin
do-not-reply at jboss.com
Sun Sep 10 11:33:35 EDT 2006
Thanks for the tip.
I could seem to get CascadeType.DELETE_ORPHAN to work in 4.04ga with a Set (didnt try with a List). I saw a bug related to this, http://opensource.atlassian.com/projects/hibernate/browse/EJB-53 but it appears fixed long ago.
I made a little test case that persists the Order with one OrderItem. I then call order.getOrderItems().clear() and then call (thru the sessionbean) em.merge(order) and even do an explicit flush(). The underlying row for the OrderItem is not deleted.
This whole thing is not a big deal since I can explicitly delete the child objects no longer in the Set. I was just curious as to how to do it automatically.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970615#3970615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970615
More information about the jboss-user
mailing list