Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-2742

2 ManyToMany relations to the same target entity make the schema update fail by default


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4
    • Fix Version/s: None
    • Component/s: Mapping Drivers, Tools
    • Security Level: All


      At some point in the Doctrine releases (I don't remember which version it was), the default naming of the join table of a ManyToMany relation changed from using the property name to using the name of the target entity.

      This makes it impossible to use multiple ManyToMany relations to the same target entity in a class without naming join tables explicitly. A SchemaException is thrown by the SchemaTool when trying to update the schema.

      Note that this issue is not caught by the SchemaValidator. It will display us that the mapping files are correct (before throwing the above exception in the second step when trying to compare it to the existing database)


        There are no comments yet on this issue.


          • Assignee:
            beberlei Benjamin Eberlei
            stof Christophe Coevoet
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: