mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-650: $data using wrong index in UnitOfWork::createEntity() in one to one assoc #803
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 (Jun 22, 2010).
Jira issue originally created by user ss10sb:
It looks like $data is using the wrong index ($srcColumn) in UnitOfWork::createEntity() line 1834 (1854 in github repo, it seems my IDE can't count ;)) to get the $joinColumnValue. Since $data contains the camelized field names and $srcColumn is the actual field name, should it be:
?
@doctrinebot commented on GitHub (Jun 23, 2010):
Comment created by romanb:
Not really, join columns have no field name but you may have encountered one of DDC-522 DDC-383
Join columns should really never be mapped to fields, they have no place whatsoever in the objects.
@doctrinebot commented on GitHub (Jun 23, 2010):
Comment created by ss10sb:
It looks like it is DDC-383 for me. I think this occurred in my case because the tables use compound keys and I was using partials and part of the compound key was also the foreign key for a joined table. Since the partial required all the compound keys be added to the field list, the foreign key was also added and probably caused this.
Thanks for the explanation.
@doctrinebot commented on GitHub (Aug 8, 2010):
Comment created by romanb:
Should be fixed now.
@doctrinebot commented on GitHub (Aug 8, 2010):
Issue was closed with resolution "Fixed"