JdbcAggregateOperations delete by query
Issue link: #1978
Add deleteAllByQuery method to JdbcAggregateOperations
This method enables deleting aggregates based on a query by performing the following steps:
- Select root IDs matching the query with a SELECT ... FOR UPDATE to lock the rows.
- Delete all sub-entities associated with the selected root IDs.
- Delete the root entities identified by the selected IDs.
see #1978
I’ve opened a draft PR for #1978. If you have any suggestions for improvement or spot any issues, I’d be glad to make the necessary changes. Thank you for reviewing it!
Thanks for review
i Changed the steps as follows:
- Lock the target rows using SELECT ... FOR UPDATE based on the query conditions.
- Delete sub-entities by leveraging a subquery that selects the matching root rows.
- Delete the root entities using the query conditions.
Hello
It looks like other commits were merged and now my previous PR has a conflict. Should I resolve it and push again?. and I can also make any improvements to my PR.
Hello
It looks like other commits were merged and now my previous PR has a conflict. Should I resolve it and push again?. and I can also make any improvements to my PR.
That would be awesome
hello ! I’ve resolved the conflicts and made some minor adjustments before pushing again.
I’ve resolved new conflicts.