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 |