OpenJPA
  1. OpenJPA
  2. OPENJPA-567

@OrderColumn generates duplicate order numbers.

    Details

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

      Description

      @OrderColumn generates and inserts duplicate entries. This is not always the issue, but only for first number, and it starts at 1 instead of 0. The problem is in class StoreCollectionFieldStrategy.load() method where variable seq needs to be initialized with -1.

      1. OrderColumnTest.zip
        12 kB
        Vikram Bhatia
      2. proposed-soln.patch
        0.7 kB
        Vikram Bhatia

        Activity

        Hide
        Vikram Bhatia added a comment -

        Please see README.txt in zip file.

        Show
        Vikram Bhatia added a comment - Please see README.txt in zip file.
        Hide
        Vikram Bhatia added a comment -

        Proposed Solution.

        Show
        Vikram Bhatia added a comment - Proposed Solution.
        Hide
        Patrick Linskey added a comment -

        Patch looks good. I'm running a remote test against it now; it should submit to the 1.1.x branch shortly.

        I had been curious about backward-compatibility with existing data sets; Srinivas points out that this isn't an issue since the result set will never be empty in the case that there is data, and so the existing data will be read.

        Show
        Patrick Linskey added a comment - Patch looks good. I'm running a remote test against it now; it should submit to the 1.1.x branch shortly. I had been curious about backward-compatibility with existing data sets; Srinivas points out that this isn't an issue since the result set will never be empty in the case that there is data, and so the existing data will be read.
        Hide
        Vikram Bhatia added a comment -

        Can the test case be added to regression test suite?

        Show
        Vikram Bhatia added a comment - Can the test case be added to regression test suite?

          People

          • Assignee:
            Unassigned
            Reporter:
            Vikram Bhatia
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development