EclipseLink/Development/JPA 2.0/orphan removal
JPA 2.0 specification has introduced an Orphan Removal option to relationship mappings. If this option is set to true then any child removed from the relationship must be removed (deleted). Adoption (moving a child from one relationship to another and not having it removed) is not supported by the specification but may be an option for EclipseLink.
See JPA 2.0 ED section 2.9 and 9.1.33 for details.
This functionality differs from Private Ownership in that removeOrphan does not imply cascade persist as well. Private Ownership treats the relationship as Cascade ALL. If the operation occurred as the first step of the flush operation (queued by change tracking perhaps) then adoption would work automatically.
- Develop model for testing
- approx 2 days
- Update processing
- approx 5 days - functionality
- approx 2 days - annotation/XML updates