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

Entity with composite foreign keys identifiers should be persisted after related entities without exception



      I've seen that when you create an entity with a composite foreign key as identifier it cannot be flushed until the related entities are already flushed to the database and not just persisted.

      It would be nice to let the user flush all the entities together and just INSERT first the related entities to get the ID and then use that to INSERT the entity with composite foreign keys.

      I'm going to create a pull request with the failing test.

        Issue Links


          alex88 Alessandro Tagliapietra created issue -
          ocramius Marco Pivetta made changes -
          Field Original Value New Value
          Link This issue depends on DDC-2339 [ DDC-2339 ]
          ocramius Marco Pivetta made changes -
          Labels orm unitofwork autoincrement commitorder identifier identity orm sequence unitofwork
          ocramius Marco Pivetta made changes -
          Link This issue relates to DDC-3389 [ DDC-3389 ]
          ocramius Marco Pivetta made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
          Resolution Can't Fix [ 7 ]


            • Assignee:
              ocramius Marco Pivetta
              alex88 Alessandro Tagliapietra
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: