Skip to content
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

[GH-6394] Bugfix: IdentifierFlattener support for association non-object values. #8384

Merged

Conversation

beberlei
Copy link
Member

@beberlei beberlei commented Dec 8, 2020

Fixes #6394 Fixes #6393

BasicEntityPersister::update passes the wrong representation of identifiers to assignDefaultVersionValue. Instead of grabbing the values from UnitOfWork::getEntityIdentifier the method ClassMetadataInfo::getIdentifierValues must be used as in all other places where the identify flattener is ultimately used.

The difference is that UnitOfWork identifiers contain the scalar values representing an association identifier, but ClassMetadataInfo representation returns the actual entity object.

/cc @goetas

@beberlei beberlei added this to the 2.8.3 milestone Feb 28, 2021
@beberlei beberlei merged commit 657a30f into doctrine:2.8.x Apr 1, 2021
@beberlei beberlei deleted the GH-6394-FlattenIdentifierAssociationBugfix branch April 1, 2021 21:16
@goetas
Copy link
Member

goetas commented Apr 2, 2021

It is beautify to see this fixed! Thanks @beberlei !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants