rzo1 opened a new pull request, #198: URL: https://github.com/apache/openjpa/pull/198
A bulk JPQL `DELETE` deleted only the entity rows and left behind the rows of the tables the entity owns — join tables of uni-directional `@OneToMany`/`@ManyToMany` and `@ElementCollection` tables — dangling on deleted primary keys; cascading to related *entities* stays absent as the spec requires. The candidate keys are now selected once and the owned rows and entity rows are deleted by key in chunked `IN` lists, so criteria such as `SIZE()`, `MEMBER OF` or a correlated `EXISTS` cannot be affected by the deletes, while a criteria-less delete skips the key select entirely; composite ids, multi-column join foreign keys and shared container tables with constant join columns fall back to the in-memory path. The new `CleanupOwnedTablesOnBulkDelete` compatibility option restores the previous behaviour, and the migration guide documents the statement sequence, the fallbacks and the remaining bi-directional join table limitation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
