mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1510: Composite Primary Key Entities As Foreign Id #1896
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 25, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user goetas:
I have the following XML mapping.
As you can see, UserRole has an roleModule association that is an Identity through foreign Entities.
But Role PK is made by two column. One column is a string and a second column is another Identity through foreign Entities.
Currently ClassMetadataInfo::_validateAndCompleteAssociationMapping() do not allow composite keys with two or more join columns.
This behavior was added in DDC-117 (that is linked to
2d27a99acommit).Inside validateAndCompleteAssociationMapping() there is this code.
If i remove these lines, my code works and all tests passes successfully.
the current validateAndCompleteAssociationMapping() implementation does not respect http://www.doctrine-project.org/docs/orm/2.1/en/tutorials/composite-primary-keys.html#use-case-1-dynamic-attributes documentation section (Application\Model\ArticleAttribute entity uses the same approach).
@doctrinebot commented on GitHub (Dec 15, 2011):
Comment created by @beberlei:
This is not supported and will never be, its to complicated to handle this internally.
There are at least 10 if not more locations in the code that will break on this.
@doctrinebot commented on GitHub (Dec 15, 2011):
Issue was closed with resolution "Invalid"