mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3711: Error on manyToMany with composite primary key #4557
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 23, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user pantelm:
Hi,
I hope that I report in the right place.
I have an issue when I try to create an manyToMany association with an entity with a composite primary key.
The problem is that only one of the two key are create on the association table.
I also have manyToOne association that works fine.
Here are the mapping
Commune.orm.ymlZone.orm.yml@doctrinebot commented on GitHub (Apr 23, 2015):
@doctrinebot commented on GitHub (Apr 23, 2015):
Comment created by @ocramius:
What if you simply leave out the
joinColumnsmappings? Check what comes out of the metadata there, then compare it to your metadata (dump it)@doctrinebot commented on GitHub (Apr 23, 2015):
Comment created by pantelm:
When I remove the JoinsColumns mapping, I get an error:
Column nameidreferenced for relation from AppBundle\Entity\Commune towards AppBundle\Entity\Zone does not exist.How do I dump the metadata?
@doctrinebot commented on GitHub (Oct 27, 2015):
Comment created by pantelm:
I have found where the problem come from, it just two line in the Yaml driver that are not in the loops that create columns for the join table.
I want to do a pull request but I have trouble writing test.
@doctrinebot commented on GitHub (Oct 31, 2015):
Comment created by pantelm:
I made a PR for this error
[https://github.com/doctrine/doctrine2/pull/1540]
@doctrinebot commented on GitHub (Nov 8, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1540] was assigned:
https://github.com/doctrine/doctrine2/pull/1540
@doctrinebot commented on GitHub (Nov 8, 2015):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-1540] was merged:
https://github.com/doctrine/doctrine2/pull/1540
@Ocramius commented on GitHub (Aug 23, 2018):
Already handled in 2.4.7