Uploaded image for project: 'Hibernate ORM'
  1. HHH-12871

Metamodel contains managed types related to dynamic-map entities that have been excluded.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.17, 5.3.3
    • Fix Version/s: 5.3.5, 5.4
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true
    • Sprint:

      Description

      Prior to 5.2+ specific managed types could be excluded from the metamodel generation process by specifying `ignoreUnsupported`; however, since the merging of HEM into Core this is no longer being honored.

      In 5.2+, when a dynamic-map based entity-type is found, it is excluded from the metamodel. None of the prior `ignoreUnsupported` or the non-deprecated equivalent are being applied; ergo dynamic-map entity types are just out-right excluded all the time.

      The problem this causes is that the metamodel is inconsistent. We still return embeddable managed types that reference that entity-type as the parent; however we don't return the entity type as a managed type.

      For 5.2+ we should either

      1. Exclude embeddable types that are owned by dynamic-map entity-types since they're excluded.
      2. Include dynamic-map entity-types as we did prior to 5.2 and make sure both the deprecated setting `ignoreUnsupported` and its non-deprecated equivalent handle filtering properly.

      See https://discourse.hibernate.org/t/why-is-java-util-map-a-managed-type-for-hibernate-when-entity-is-audited/1113 for a discussion.
      See HHH-10968 Closed

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                crancran Chris Cranford
                Reporter:
                crancran Chris Cranford
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: