Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2338

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

    Details

      Description

      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

          Activity

          Alessandro Tagliapietra created issue -
          Hide
          Alessandro Tagliapietra added a comment -
          Show
          Alessandro Tagliapietra added a comment - Created pull request https://github.com/doctrine/doctrine2/pull/605
          Marco Pivetta made changes -
          Field Original Value New Value
          Link This issue depends on DDC-2339 [ DDC-2339 ]
          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-605] was closed:
          https://github.com/doctrine/doctrine2/pull/605

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-605] was closed: https://github.com/doctrine/doctrine2/pull/605
          Marco Pivetta made changes -
          Labels orm unitofwork autoincrement commitorder identifier identity orm sequence unitofwork
          Marco Pivetta made changes -
          Link This issue relates to DDC-3389 [ DDC-3389 ]
          Hide
          Marco Pivetta added a comment -

          Known limitation affecting only post-insert ID generation (mysql et simila)

          Show
          Marco Pivetta added a comment - Known limitation affecting only post-insert ID generation (mysql et simila)
          Marco Pivetta made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
          Resolution Can't Fix [ 7 ]

          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-2338, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

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

              Dates

              • Created:
                Updated:
                Resolved: