mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #11558] Introduced finalizeAndExecute to the AbstractSqlWalker, unified SingleStatementExecutor #13099
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/11558
State: closed
Merged: No
Fixes #11112
I've taken the approach suggested by @beberlei in https://github.com/doctrine/orm/pull/11188#discussion_r1511681232
This essentially delays setting limit/offset and locking on the SQL to the
finalizeAndExecutefunction, which accepts theQueryobject as a parameter.I also unified the
SingleSelectExecutorandSingleTableDeleteUpdateExecutorinto a single class:SingleStatementExecutorsince it was mostly the same implementation.The
Query::getQueryCacheIdwas changed to no longer care about thefirstResult/maxResultsparameters, since using them in the cache key results in different cache keys for what is essentially the same query.I had to expose the
selectedClassesfield from theSqlWalkersince it is used to determine if optimistic locking is possible.Please let me know if this is an acceptable solution.
If so, I will gladly introduce tests/make any other necessary adjustments, per maintaniers' instructions.
Thank you!