Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329055

Summary: Deleted entity's private owned child entities does not get preRemove event
Product: z_Archived Reporter: Daniel Lo <daniel.lo>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: douglas.clarke, eclipselink.foundation-inbox, michael.f.obrien, mike, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Daniel Lo CLA 2010-10-29 11:15:26 EDT
Build Identifier: 2.0.2.v20100323-r6872

When an entity is deleted by EntityManager.remove() API, its private owned child entities are deleted when the transaction is committed.  The JPA preRemove event was not fired against the deleted private owned child entities, the applications rely on this event to clean up some relationships, so this event should be fired during EntityManager.remove() when the parent entity is deleted, it will be too late to do the cleanup during the commit via the preDelete event.  So it would idea that Entity.remove() API can recursively delete the private owned child entities.

Reproducible: Always
Comment 1 Tom Ware CLA 2010-11-12 08:18:09 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:16:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:25:49 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink