OpenJPA
  1. OpenJPA
  2. OPENJPA-2066

Edge case in openJPA-1227. openJPA fails to create a join and thus returns wrong data when a collection is selected from superclass and another field is selected from subclass twoor more levels down the hierarchy.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.1, 2.1.1, 2.2.0
    • Fix Version/s: 1.1.1, 2.2.0
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      openJPA-1227 fixes the wrong SQL generation error when superclass contains an eager to-many field, and this is the only field selected in the superclass, and when one or more fields are selected in the subclass, openjpa fails to create a join between the subclass and superclass. But the issue still remains when one or more fields are selected from subclasses two levels down the hierarchy.

      Example:
      GrandChildClass extends ChildChildClass extends ChildClass extends ParentClass.

      When I select a filed from GrandChildClass and a to-many field from ParentClass then openjpa fails to create a join between the classes.

      1. OPENJPA2066_trunk.diff
        12 kB
        Ravi P Palacherla
      2. OPENJPA2066_11x.diff
        12 kB
        Ravi P Palacherla

        Activity

        Ravi P Palacherla created issue -
        Hide
        Ravi P Palacherla added a comment -

        Patch contributed by Hiroki Tateno.
        Test case contributed by Ravi Palacherla.

        Show
        Ravi P Palacherla added a comment - Patch contributed by Hiroki Tateno. Test case contributed by Ravi Palacherla.
        Ravi P Palacherla made changes -
        Field Original Value New Value
        Attachment OPENJPA2066_11x.diff [ 12500790 ]
        Hide
        Ravi P Palacherla added a comment -

        Patch contributed by Hiroki Tateno.
        TestCase contributed by Ravi Palacherla.

        Show
        Ravi P Palacherla added a comment - Patch contributed by Hiroki Tateno. TestCase contributed by Ravi Palacherla.
        Ravi P Palacherla made changes -
        Attachment OPENJPA2066_trunk.diff [ 12500791 ]
        Hide
        Rick Curtis added a comment -

        Assigning to Ravi.

        Show
        Rick Curtis added a comment - Assigning to Ravi.
        Rick Curtis made changes -
        Assignee Ravi P Palacherla [ rpalache ]
        Hide
        Rick Curtis added a comment -

        Update fix versions.

        Show
        Rick Curtis added a comment - Update fix versions.
        Rick Curtis made changes -
        Fix Version/s 2.2.0 [ 12315910 ]
        Fix Version/s 2.1.1 [ 12316191 ]
        Affects Version/s 2.2.0 [ 12315910 ]
        Hide
        Rick Curtis added a comment -

        Ravi -

        If you are complete with this JIRA, please mark it as resolved.

        Thanks,
        Rick

        Show
        Rick Curtis added a comment - Ravi - If you are complete with this JIRA, please mark it as resolved. Thanks, Rick
        Ravi P Palacherla made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Ravi P Palacherla
            Reporter:
            Ravi P Palacherla
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development