OpenJPA
  1. OpenJPA
  2. OPENJPA-1665

Problems when using auto incrementing colums that start at zero

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.2.3, 1.3.0, 2.0.2, 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      This issue was reported on the users mailing list[1].

      The issue is that it is possible when using auto generated ids that there is a current entity in the persistence context that has an id of zero, and by default when a new entity is created it also has an id of zero. When persisting the second entity, OpenJPA incorrectly detects that there are multiple entities with the same id in the context even though the new id doesn't have an id from the database yet.

      [1]http://openjpa.208410.n2.nabble.com/An-object-of-type-src-StatusUpdate-with-oid-0-already-exists-in-this-context-another-cannot-be-persi-td5030272.html#a5030272

        Issue Links

          Activity

          Michael Dick made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Michael Dick made changes -
          Fix Version/s 1.2.3 [ 12314517 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.0.2 [ 12315257 ]
          Michael Dick made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Michael Dick made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Milosz Tylenda made changes -
          Fix Version/s 2.1.0 [ 12314542 ]
          Fix Version/s 2.0.1 [ 12314532 ]
          Rick Curtis made changes -
          Link This issue relates to OPENJPA-1066 [ OPENJPA-1066 ]
          Rick Curtis made changes -
          Link This issue is blocked by OPENJPA-1066 [ OPENJPA-1066 ]
          Rick Curtis made changes -
          Link This issue is blocked by OPENJPA-1066 [ OPENJPA-1066 ]
          Rick Curtis made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.1 [ 12314532 ]
          Resolution Fixed [ 1 ]
          Rick Curtis created issue -

            People

            • Assignee:
              Rick Curtis
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development