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

        Hide
        Rick Curtis added a comment -

        Committed revision 1097517 to trunk.

        Show
        Rick Curtis added a comment - Committed revision 1097517 to trunk.
        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.
        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.
        Hide
        Rick Curtis added a comment -

        Closing resolved issues.

        Show
        Rick Curtis added a comment - Closing resolved issues.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development