Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2305

Canonical MetaModel class generation should not use inhertence

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.2.1.1
    • Fix Version/s: 2.2.1.1, 2.3.0
    • Component/s: criteria
    • Labels:
      None

      Description

      The generated source code for canonical metamodel classes mirrored the same inheritance hierarchy of the domain classes. This strategy exposed an error that resulted in wrong target SQL query under the following domain model
      a) A @MappedSuperClass M defined a primary key field x
      b) The primary key field x is an @EmbeddedId E
      c) An @Entity class D derived from M and navigated to the fields of E via x

      The solution is to generate canonical class D_.java as a flattened structure instead of inheriting from M_.java (as is done currently).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ppoddar@apache.org Pinaki Poddar
                Reporter:
                ppoddar@apache.org Pinaki Poddar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: