|
Re: Cascade.remove performance suggestions [message #1110924 is a reply to message #1107540] |
Tue, 17 September 2013 10:11  |
Eclipse User |
|
|
|
EclipseLink does support deleting a private owned OneToMany in a single query, but this depends on several things.
- you must set the relationship as @PrivateOwned or orphan-removal=true
- you need to use the @DeleteAll annotation on the relationship, or configure the mapping in a customizer
- the child can't use optimistic locking (because lock must be checked), or multiple tables, inheritance or have its own private owned relationships (because they also need to be removed)
- also note that an removal events may not be fired if you delete all of the children
Otherwise, you could use a delete JPQL query to delete the children or tree.
|
|
|
Powered by
FUDForum. Page generated in 0.02761 seconds