We're updating the issue view to help you get more done. 

The JPA Metamodel contains multiple non-equivalent EmbeddableTypes per @Embeddable class

Description

Following HHH-12124, this is a further specification of the problem, on a higher level.

I think that for each Persistence Class (annotated with @Entity, @Embeddable, ...) there should be one (and only one) ManagedType to be retrieved from Metamodel (itself, or retrived by Attribute types).

Actually, this is true only for Entity classes.

I added a test case to check for both uniqueness (by identity) and equivalence of ManagedTypes.

Actually, on 5.3.1 (and 5.2.12):

  • managedTypesSelfConsistenceByEquivalenceTest: pass

  • managedTypesFromAttributesConsistenceByEquivalenceTest: fail

  • managedTypesFromAttributesConsistenceByIdentityTest: fail

  • entityTypesFromAttributesConsistenceByEquivalenceTest: pass

  • entityTypesFromAttributesConsistenceByIdentityTest: pass

  • embeddableTypesFromAttributesConsistenceByEquivalenceTest: fail

  • embeddableTypesFromAttributesConsistenceByIdentityTest: fail

Thanks

Environment

None

Status

Assignee

Unassigned

Reporter

Michele Mariotti

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.1

Priority

Major