Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1787

Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Attached is a small patch for a bug in the file JoinedSubclassPersister.php. When persisting multiple new entities that are subclasses of a baseclass (joined), and having the @Version attribute set, only for the last one a query is run to fetch the new value of the version field. The other one is tested with NULL, and throws an optimistic locking exception.

        Activity

        Show
        Marco Pivetta added a comment - Merged: https://github.com/doctrine/doctrine2/commit/6f1642b35d56f0609d27a3ff874c456827e90d6b

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Jack van Galen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: