OpenJPA
  1. OpenJPA
  2. OPENJPA-1944

Extra select statements executed when version column is null.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 2.1.0
    • Fix Version/s: 2.1.1, 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      This problem was originally reported on the users mailing list by Diego Cattelan. Link to the thread :http://openjpa.208410.n2.nabble.com/N-query-problem-with-Version-td6027619.html

      The problem occurs if a null value is returned for an entity's version field. In this case OpenJPA will issue a second select statement to re-fetch the version, potentially resulting in a lot of repetitive SQL statements.

        Activity

        Hide
        Albert Lee added a comment -

        Close issue in preparation for 2.2.0 release.

        Show
        Albert Lee added a comment - Close issue in preparation for 2.2.0 release.
        Hide
        Rick Curtis added a comment -

        Checked changes into 2.1.x and trunk

        Show
        Rick Curtis added a comment - Checked changes into 2.1.x and trunk
        Hide
        Rick Curtis added a comment -

        The previous change that Mike committed causes an OLE if an Entity with a null version is updated. The change I'm going to commit shortly here reverts the previous commit and looks to see if a null version field has been loaded before going back to the DB.

        Show
        Rick Curtis added a comment - The previous change that Mike committed causes an OLE if an Entity with a null version is updated. The change I'm going to commit shortly here reverts the previous commit and looks to see if a null version field has been loaded before going back to the DB.
        Hide
        Rick Curtis added a comment -

        Reopening this JIRA as it needs a bit more work.

        Show
        Rick Curtis added a comment - Reopening this JIRA as it needs a bit more work.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development