[DDC-2011] Schema tool fail to handle ManyToMany relation with an existing joinTable Created: 04/Sep/12  Updated: 09/Feb/13  Resolved: 09/Feb/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Tools
Affects Version/s: Git Master
Fix Version/s: None
Security Level: All

Type: Bug Priority: Minor
Reporter: Erwan Richard Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 2
Labels: schematool


 Description   

The schemaTool fail with a Doctrine\DBAL\Schema\SchemaException when trying to handle ManyToMany relation with an existing joinTable.

My use case :

I'm using the Tree DoctrineExtension with the Closure strategy. It create a mapping between my Category entity and a CategoryClosure entity.

For conveniency, I've setup a ManyToMany relation between Category and Category with the CategoryClosure table as joinTable.

Doctrine ORM handle perfectly this case but the schema tool is failing with :
The table with name 'category_closure' already exists.



 Comments   
Comment by Alexander [ 09/Feb/13 ]

You can't expect the schematool to play nice if you use the table of an entity as m2m table.

Generated at Thu Oct 23 21:28:23 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.