OpenJPA
  1. OpenJPA
  2. OPENJPA-2170

Multiple INSERT of the same row in batch update manager

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.3.0
    • Fix Version/s: 2.3.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      When trying to persist multiple different entities to the data base using the batching update manager, if an INSERT failed, the update manager will erroronously attempt to INSERT the same row to the database again. E.g.

      em.persist(entity_type_1_id_1); // failed with a SQLException on INSERT
      em.persist(entity_type_2_id_2);
      em.flush();

      will cause 2 insert of :

      INSERT ENTITY_TYPE_1 ...... WHERE ID="ID_1"
      Failed with an SQLException and insert the same row again.
      INSERT ENTITY_TYPE_1 ...... WHERE ID="ID_1"

        Activity

        Albert Lee created issue -
        Albert Lee made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Albert Lee made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Albert Lee made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1m 10s 1 Albert Lee 10/Apr/12 20:30
        In Progress In Progress Resolved Resolved
        23h 38m 1 Albert Lee 11/Apr/12 20:09
        Resolved Resolved Closed Closed
        9s 1 Albert Lee 11/Apr/12 20:09

          People

          • Assignee:
            Albert Lee
            Reporter:
            Albert Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development