DDC-783: when a column is the foreign key reference to 2 tables, doctrine 2 can't create entity #961

Closed
opened 2026-01-22 12:57:24 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 1, 2010).

Jira issue originally created by user minxuan.guo:

when a column in table A is the foreign key reference to 2 or more tables, doctrine 2 can't create entity for table A

for instance:

I have a column named idBC in table A, which is the foreign key reference to the idB of table B and the idC of table C
when i "...orm:convert-mapping --from-database annotation..."
I got
Property "idBc " in "A" was already declared, but it must be declared only once

Originally created by @doctrinebot on GitHub (Sep 1, 2010). Jira issue originally created by user minxuan.guo: when a column in table A is the foreign key reference to 2 or more tables, doctrine 2 can't create entity for table A for instance: I have a column named idBC in table A, which is the foreign key reference to the idB of table B and the idC of table C when i "...orm:convert-mapping --from-database annotation..." I got **Property "idBc " in "A" was already declared, but it must be declared only once**
admin added the Bug label 2026-01-22 12:57:24 +01:00
admin closed this issue 2026-01-22 12:57:25 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 1, 2010):

Comment created by @beberlei:

yes, see http://www.doctrine-project.org/projects/orm/2.0/docs/reference/limitations-and-known-issues/en#current-limitations:foreign-keys-as-identifiers

this is currently not supported and is developed in the DDC-117 experimental branch. However that branch does not have support for Database Re-engineering yet.

@doctrinebot commented on GitHub (Sep 1, 2010): Comment created by @beberlei: yes, see http://www.doctrine-project.org/projects/orm/2.0/docs/reference/limitations-and-known-issues/en#current-limitations:foreign-keys-as-identifiers this is currently not supported and is developed in the [DDC-117](http://www.doctrine-project.org/jira/browse/DDC-117) experimental branch. However that branch does not have support for Database Re-engineering yet.
Author
Owner

@doctrinebot commented on GitHub (Sep 1, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 1, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#961