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

Duplicate Property with AccessType.PROPERTY and MappedSuperclass

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      We have the following class hierarchy:
      entity A extends from B (mapped superclass).
      AccessType is PROPERTY.

      class A defines a method getTest() which is overriden in class B.

      This causes the following exception:

      Caused by: org.hibernate.MappingException: Duplicate property mapping of testA found in sample.entities.B
      at org.hibernate.mapping.PersistentClass.checkPropertyDuplication(PersistentClass.java:515)
      at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:505)
      at org.hibernate.mapping.RootClass.validate(RootClass.java:270)
      at org.hibernate.cfg.Configuration.validate(Configuration.java:1360)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1851)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:85

      the attached zip contain a testcase.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 4.1h
                  4.1h