MappingException when @MapKeyColumn refers to a column mapped in embeddable map value
Description
Map<Basic, Embeddable> does not work, when the map key is a persistent field of the value. The map key shall not be represented as a separate table column, this is why the example uses @MapKey and not @MapKeyColumn.
Example:
Hibernate appears to expect an Entity as map value:
org.hibernate.AnnotationException: Associated class not found: LocalizedString
, this issue has already been closed. If you are still seeing problems in 5.4, then please open a new issue and attach a test case that reproduces the issue. Test templates can be found at https://github.com/hibernate/hibernate-test-case-templates
Map<Basic, Embeddable> does not work, when the map key is a persistent field of the value. The map key shall not be represented as a separate table column, this is why the example uses @MapKey and not @MapKeyColumn.
Example:
Hibernate appears to expect an Entity as map value:
org.hibernate.AnnotationException: Associated class not found: LocalizedString
Detailed discussion of this use case:
http://hwellmann.blogspot.com/2010/07/jpa-20-mapping-map.html