mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2383: Foreign relations on primary keys don't work on more than two entities (like Foo<>Bar<>Baz) #2993
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 (Apr 1, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user extreme:
I'm trying to accomplish something like this:
http://docs.doctrine-project.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity
For two entities (Foo<>Bar) it works as expected but adding another entity related to Bar (so it's Foo<>Bar<>Baz) ends up with this error:
This error appears when there are some records in the database and I want to query for example all Foos.
My entites look like this:
And fails on
@doctrinebot commented on GitHub (Apr 1, 2013):
Comment created by extreme:
Attaching a test case which results in two exceptions - while creating the schema and while fetching entities.
@doctrinebot commented on GitHub (Apr 14, 2013):
Comment created by @beberlei:
This is sadly a restriction of the foreign keys as primary key feature.
Due to the architecture of shared nothing Metadata instances we cannot validate this at mapping compile time, only at runtime, thus leading to this error.
@doctrinebot commented on GitHub (Apr 14, 2013):
Issue was closed with resolution "Can't Fix"