[DDC-2414] Unable to create One-To-Many relation with composite keys Created: 25/Apr/13 Updated: 01/May/13 Resolved: 01/May/13
|Project:||Doctrine 2 - ORM|
|Component/s:||Mapping Drivers, Tools|
|Affects Version/s:||Git Master, 2.3.3|
|Reporter:||Bruno CHALOPIN||Assignee:||Benjamin Eberlei|
Ubuntu 12.04, PHP 5.4.9
Given these entities :
I want to link users and groups but only from the same domain.
|Comment by Fabio B. Silva [ 28/Apr/13 ]|
Could you please explain it a little deeper ?
Also, you shoud describe operations you are executing and which errors you got.
|Comment by Bruno CHALOPIN [ 29/Apr/13 ]|
The relation i was trying to make is http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-unidirectional-with-join-table
However, it implies to use a unique contraint and as explain above when trying to create the schema via doctrine, as i use composite keys, it will generate 2 unique contraints (one for each field) and not one composite unique constraint.
Nevertheless, it seems like using composite keys is a lot buggy in doctrine (see http://www.doctrine-project.org/jira/browse/DDC-2413)
|Comment by Benjamin Eberlei [ 01/May/13 ]|
We discussed this in