OpenJPA
  1. OpenJPA
  2. OPENJPA-1989

*ToOne relationships specified as LAZY in xml aren't honored

    Details

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

      Description

      While doing some testing I found that trying to override a [*]ToOne mapping as LAZY doesn't work. It is a simple change to the XML parser where when we find a ToOne element with a fetch specified, we need to explicitly set whether it is in the default fetch group.

        Activity

        Rick Curtis created issue -
        Hide
        Rick Curtis added a comment -

        Committed revision 1097517 to trunk.

        Show
        Rick Curtis added a comment - Committed revision 1097517 to trunk.
        Rick Curtis made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Rick Curtis added a comment -

        Reopening this issue as my previous change introduced a bug.

        Show
        Rick Curtis added a comment - Reopening this issue as my previous change introduced a bug.
        Rick Curtis made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Rick Curtis added a comment -

        I fixed a bug where in JDBCStoreManager we rely on the return value from FieldMetaData.isDefaultFetchGroupExplicit() to tell us when we can perform an optimization. This optimization is to select the foreign id field(if they exist) of a Lazy relationship. Due to my previous change, the explicit flag was getting incorrectly changed when overriding mapping info via xml. Now XML vs Annotations should behave the same in this scenario.

        Committed revision 1101951 to trunk.

        Show
        Rick Curtis added a comment - I fixed a bug where in JDBCStoreManager we rely on the return value from FieldMetaData.isDefaultFetchGroupExplicit() to tell us when we can perform an optimization. This optimization is to select the foreign id field(if they exist) of a Lazy relationship. Due to my previous change, the explicit flag was getting incorrectly changed when overriding mapping info via xml. Now XML vs Annotations should behave the same in this scenario. Committed revision 1101951 to trunk.
        Rick Curtis made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rick Curtis made changes -
        Fix Version/s 2.1.1 [ 12316191 ]
        Hide
        Rick Curtis added a comment -

        Closing resolved issues.

        Show
        Rick Curtis added a comment - Closing resolved issues.
        Rick Curtis made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7m 19s 1 Rick Curtis 28/Apr/11 16:02
        Resolved Resolved Reopened Reopened
        12d 22h 16m 1 Rick Curtis 11/May/11 14:19
        Reopened Reopened Resolved Resolved
        2h 8m 1 Rick Curtis 11/May/11 16:27
        Resolved Resolved Closed Closed
        62d 23h 43m 1 Rick Curtis 13/Jul/11 16:11

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development