@IdClass with @MappedSuperclass results in "property not found"

Description

If class heirarchy defines a IdClass with a property in the @MappedSuperclass and a property in the @Entity class, the entity manager throws an AnnotationException:

Caused by: org.hibernate.AnnotationException: Property of @IdClass not found in entity com.jpabugreport.Employee: ssn
at org.hibernate.cfg.AnnotationBinder.fillComponent(AnnotationBinder.java:2603)
at org.hibernate.cfg.AnnotationBinder.bindIdClass(AnnotationBinder.java:2716)
at org.hibernate.cfg.AnnotationBinder.mapAsIdClass(AnnotationBinder.java:1041)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:781)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3788)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3742)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
... 49 more

This issue is mentioned by others here: http://stackoverflow.com/questions/4216102/composite-key-in-jpa-hibernate-with-inherited-class

Attached is test project to reproduce issue

Environment

4.3.5-final

Status

Assignee

Chris Cranford

Reporter

Samuel Nelson

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.2.8
5.0.8
4.3.5

Priority

Major
Configure