Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
beberlei merged 3 commits into
doctrine:2.8.xfrom
beberlei:GH-6394-FlattenIdentifierAssociationBugfix
Apr 1, 2021
Merged

[GH-6394] Bugfix: IdentifierFlattener support for association non-object values.#8384
beberlei merged 3 commits into
doctrine:2.8.xfrom
beberlei:GH-6394-FlattenIdentifierAssociationBugfix

Conversation

@beberlei
Copy link
Copy Markdown
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 requested a review from lcobucci December 8, 2020 02:48
@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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

Exception in IdentifierFlattener::flattenIdentifier - column name used instead of field name in identifier extraction

3 participants