Uploaded image for project: '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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0, 2.1.1, 2.2.0
    • 1.2.0, 2.2.0
    • None
    • None
    • 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.

      Attachments

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

        Activity

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

          rpalache Ravi Prakash Palacherla added a comment - Patch contributed by Hiroki Tateno. Test case contributed by Ravi Palacherla.

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

          rpalache Ravi Prakash Palacherla added a comment - Patch contributed by Hiroki Tateno. TestCase contributed by Ravi Palacherla.

          Assigning to Ravi.

          curtisr7 Richard G. Curtis added a comment - Assigning to Ravi.

          Update fix versions.

          curtisr7 Richard G. Curtis added a comment - Update fix versions.

          Ravi -

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

          Thanks,
          Rick

          curtisr7 Richard G. Curtis added a comment - Ravi - If you are complete with this JIRA, please mark it as resolved. Thanks, Rick

          People

            rpalache Ravi Prakash Palacherla
            rpalache Ravi Prakash Palacherla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: