mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1652: ArrayHydrator with composite primary key #2077
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 (Feb 15, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user ghennady:
Hi.
Problem with ArrayHydrator and composite primary key.
Given the following data (PRIMARY KEY (
ancestor*id,descendant*id))||ancestor_id||descendant_id||depth||
|1|1|0|
|1|2|1|
Expected both counts are equals 2.
In case getArrayResult() in result only first record hydrated, second record are ommited
Below examples model and insertion in db
P.S.
Its work like expected in case entity ResourceClosure has simple primary key.
@doctrinebot commented on GitHub (Feb 20, 2012):
Comment created by @beberlei:
Verified
@doctrinebot commented on GitHub (Feb 20, 2012):
Comment created by @beberlei:
@Guilherme - This is because the SQL Walker decides to $addMetaColumns => false here. Why did we add this? This skips all meta columns in Array Results, i don't get what that is good for.
@doctrinebot commented on GitHub (Feb 20, 2012):
Comment created by @beberlei:
PR: https://github.com/doctrine/doctrine2/pull/290
Guilherme has to verify this
@doctrinebot commented on GitHub (Mar 3, 2012):
Comment created by @guilhermeblanco:
Resolved with merge of https://github.com/doctrine/doctrine2/pull/290
@doctrinebot commented on GitHub (Mar 3, 2012):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Mar 3, 2012):
Comment created by @beberlei:
Merged back to 2.2, will be in 2.2.1