OpenJPA
  1. OpenJPA
  2. OPENJPA-817

Order of inserts lost when using ConstraintUpdateManager

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 2.0.0-M2
    • Fix Version/s: 1.1.1, 1.2.1, 1.3.0, 2.0.0-M2
    • Component/s: jdbc
    • Labels:
      None

      Description

      The ConstraintUpdateManager does a good job of ordering inserts, updates and deletes when the internal metadata is complete. If the internal metadata is not complete (ie there are no @ForeignKey annotations) SQL statements are executed in an arbitrary order.

      The application can avoid this by adding the appropriate annotations, or by obtaining the data from the database, but we can make some attempt to preserve the order of execution.

      1. openJPA-817_1.1.x.patch
        23 kB
        Ravi P Palacherla

        Issue Links

          Activity

          Hide
          Michael Dick added a comment -

          Didn't notice the changes to ConstraintUpdateManager in 1.3.x and trunk which affect this issue. It looks like I missed a relevant spot in those releases, but since it's late on Friday I'm reverting the changes until I have more time to figure out the right solution.

          The fix for 1.2.x seems consistent (at least to my ability to test it so I'm leaving it alone for now).

          Show
          Michael Dick added a comment - Didn't notice the changes to ConstraintUpdateManager in 1.3.x and trunk which affect this issue. It looks like I missed a relevant spot in those releases, but since it's late on Friday I'm reverting the changes until I have more time to figure out the right solution. The fix for 1.2.x seems consistent (at least to my ability to test it so I'm leaving it alone for now).
          Hide
          David Ezzio added a comment -

          Applied Ravi's patch to 1.1.x branch at rev 889793.

          Show
          David Ezzio added a comment - Applied Ravi's patch to 1.1.x branch at rev 889793.

            People

            • Assignee:
              Michael Dick
              Reporter:
              Michael Dick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development