OpenJPA
  1. OpenJPA
  2. OPENJPA-2305

Canonical MetaModel class generation should not use inhertence

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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).

        Issue Links

          Activity

          Mark Struberg made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Pinaki Poddar made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Invalid [ 6 ]
          Pinaki Poddar made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Pinaki Poddar made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Kevin Sutter made changes -
          Link This issue relates to OPENJPA-2339 [ OPENJPA-2339 ]
          Albert Lee made changes -
          Field Original Value New Value
          Fix Version/s 2.3.0 [ 12319463 ]
          Pinaki Poddar created issue -

            People

            • Assignee:
              Pinaki Poddar
              Reporter:
              Pinaki Poddar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Development