DDC-192: Composite primary key workaround stopped working after SchemaTool refactoring #2588

Closed
doctrinebot opened this Issue Dec 3, 2009 · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user nicokaiser:

This example shows a User* and a Phonenumber entity, where the *Phonenumber entity has a phone_ column and a _userId column (which maps the Phonenumber to the User). Primary key should be composite (phone, userId).

http://pastie.org/private/uoawwvf75onnvph8bj1fwg

Normally I would achieve this by adding @Id to the User association in Phonenumber.php, but since @Id is not supported for associations, I added a userId property (which I have to set every time I set the User property).

After the SchemaTool refactoring, Doctrine 2 complains about duplicate keys when trying to create the database...

see DDC-117 (@Id on associations should really be supported and add the "JoinColumn name" to the list of primary keys...)

@doctrinebot

Comment created by @beberlei:

Can you comment on this issue, is it still present?

@doctrinebot

Comment created by romanb:

Can this be considered fixed now?

@doctrinebot

Comment created by nicokaiser:

Looks good!

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-ALPHA4 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment