-
-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persist doctrine entities with DEFERRED_EXPLICIT change tracking policy #2226
Persist doctrine entities with DEFERRED_EXPLICIT change tracking policy #2226
Conversation
Thanks @paxal ! |
Thanks for your quick merge :) |
why not just unconditionally call persist? there is no reason to do extra checks besides |
according to #2155 it does not? |
The problem is the |
The |
I dont get the resoning there. What is meant with „Changes from the outside“ and how does a persist call override them. This sounds to me more like a missuse of doctrine. Persist calls should never override anything: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/working-with-objects.html#working-with-objects |
Mhh I think that it's in case of relations there were issues when persisting updated ones. Anyway, Doctrine doesn't check for
|
I think you missread the condition. Persist is called, when the uow does not contain the entity already |
As reported in #2155 doctrine entities are not persisted if change tracking policy is
DEFERRED_EXPLICIT
.This implementation relies on
ClassMetadataInfo
, which is theClassMetadata
implementation. As it's API might change, I've added a test on method existence.