Fix false positive changes for generated columns by updating snapshop#12384
Open
podoko wants to merge 2 commits intodoctrine:3.6.xfrom
Open
Fix false positive changes for generated columns by updating snapshop#12384podoko wants to merge 2 commits intodoctrine:3.6.xfrom
podoko wants to merge 2 commits intodoctrine:3.6.xfrom
Conversation
a3b2e05 to
6901634
Compare
Author
|
I upgraded the tests in order for them to run with dbal 3.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After persisting or updating an entity having columns with the configuration
generate: 'ALWAYS', the persister was updating the data on the entity but not notifying the UnitOfWork. This led the entity to be considered dirty in subsequent flushes, triggering lifecycle events. This was especially noticeable when the database field was mapped to aDateTimeThis PR makes the persister update the UnitOfWork with the new values from the database. By doing this,
UnitOfWork::computeChangeSetdoes not consider these fields as different from the ones in the database.Note that if the user does something like
$entity->nonUpdatableField = 'new value', the unit of work will again consider the entity as dirty and the field appear in the changeSet. This problem is addressed in #12385Fixes #12017