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

Canonical MetaModel class generation should not use inhertence

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.2.1.1
    • 2.2.1.1, 2.3.0
    • criteria
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: