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

Joined inheritance : Same super class field name in embedded type causes embedded field to be ignored

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.2.2
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      Consider a class hierarchy with JOINED inheritance with an abstract class containing a field "type". The inherited subclass contains an embeddable. The embeddable also has a field named "type".
      If you persist the concrete subclass with the embeddable then this field "type" is ignored like a transient field, i.e. it is stored and retrieved as NULL value no matter how it is initially filled.
      This is a regression since 5.2.0. All versions before worked correctly.
      If you rename one of the fields then it also works correctly again.
      It seems that there is a naming conflict introduced with 5.2.0 over inheritance hierarchies.

      Test case is attached.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: