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

@OrderColumn generates duplicate order numbers.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        vbhatia Vikram Bhatia added a comment -

        Please see README.txt in zip file.

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

        Proposed Solution.

        Show
        vbhatia Vikram Bhatia added a comment - Proposed Solution.
        Hide
        pcl 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
        pcl 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
        vbhatia Vikram Bhatia added a comment -

        Can the test case be added to regression test suite?

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development