[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

jantzen do-not-reply at jboss.com
Thu Apr 5 15:15:14 EDT 2007


I'm facing a similar problem with child entities not being deleted with their parents.  The exception I see is "javax.persistence.EntityNotFoundException: deleted entity passed to persist", and it looks like the entity manager is trying to persist the child entities with null references to the parent.  I have CascadeType.ALL set on that relationship.

I'd be very disappointed to learn that manual deletion of child entities or database-level cascades were necessary, as the whole point of the JPA cascade functionality is to avoid that.  But, I don't have a better answer yet.  (BTW, I'm also on jboss 4.0.5 and postgres 8.1; it's bizarre that you're hitting a constraint violation and I'm not even getting that far).

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

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



More information about the jboss-user mailing list