Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2170

Multiple INSERT of the same row in batch update manager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.0, 2.3.0
    • 2.3.0
    • jdbc
    • 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"

      Attachments

        Activity

          People

            allee8285 Albert Lee
            allee8285 Albert Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: