mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3383: [GH-1179] Fix embeddables class metadata (work-in-progress) #4179
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?
Originally created by @doctrinebot on GitHub (Nov 10, 2014).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of fabiocarneiro:
Url: https://github.com/doctrine/doctrine2/pull/1179
Message:
ClassMetadataInfo is returning more than one result in getFieldNames() for the embeddables properties. This method is used by DoctrineModule\Stdlib\Hydrator\DoctrineObject in the extraction process.
Since its returning a number of results equal the number of properties of the embedded object, it will never find the correct setter for the extraction and that causes that property to be removed from the extracted array.
I was able to solve the issue by hacking into the getFieldNames() for testing and merging the duplicated entries, and then the object was successfully extracted.
By digging into the code, i found out that there is a mapEmbedded(), but instead of using that for embeddeds, its using the default mapField, which may be the root cause of the problem.
@doctrinebot commented on GitHub (Jan 24, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1179] was labeled:
https://github.com/doctrine/doctrine2/pull/1179
@doctrinebot commented on GitHub (Jan 24, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1179] was labeled:
https://github.com/doctrine/doctrine2/pull/1179
@doctrinebot commented on GitHub (May 22, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1179] was closed:
https://github.com/doctrine/doctrine2/pull/1179