Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2011

Schema tool fail to handle ManyToMany relation with an existing joinTable

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: Tools
    • Security Level: All
    • Labels:

      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.

        Activity

        Erwan Richard created issue -
        Andras Hipsag made changes -
        Field Original Value New Value
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        Andras Hipsag made changes -
        Status Awaiting Feedback [ 10000 ] In Progress [ 3 ]
        Andras Hipsag made changes -
        Status In Progress [ 3 ] Awaiting Feedback [ 10000 ]
        made changes -
        Status Awaiting Feedback [ 10000 ] In Progress [ 3 ]
        Hide
        Alexander added a comment -

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

        Show
        Alexander added a comment - You can't expect the schematool to play nice if you use the table of an entity as m2m table.
        Alexander made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2011, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Erwan Richard
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: