Multiple @MappedSuperClass broke from a 4.3 to 5.2 upgrade

Description

it looks like there might be an issue with building the mappedSuperclassByMappedSuperclassMapping map in MetadataContext.java

Everything was working like a champ in 4.3.10, I decided to upgrade to get JDK8 Date stuff.

In my code I have bunch of entities that extend by AbstractAppObject. and when AttributeFActory.getDeclarerEntityMetamodel is called for the first time I have my DiscussionMessage entity in the (MetadataContext) mappedSuperclassByMappedSuperclassMapping 3 times. this causes virtualIdentifierMemberResolver to find the wrong entity at some point. I end up with a "expecting IdClass mapping" IllegalArgumentException.

If remove my DiscussionMessage entity then I end up with the 'next' entity that has the same chain of abstract classes.

some of my code -

from spring -

Environment

MySql, Spring JPA 1.11.3

Status

Assignee

Unassigned

Reporter

denoc

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

4.3.10

Affects versions

Priority

Critical
Configure