I have the following entity:
So basically a product with a name where the name is a Map of Locale - LocalizedValueInterface and this interface is the interface for the LocalizedValue embeddable class:
Now when Hibernate creates the JPA Metamodel I see what ends in there is a collection of all entities (which correctly contains my Product entity) and a collection of all embeddables (which incorrectly contains only the LocalizedValueInterface). I followed the code and found out this:
in AttributeFactory#PluralAttributeMetadataImpl on line 781. This code inspects the map and takes the second class in the generics argument and uses it for embeddable class. I think it should take it from the @ElementCollection(targetClass = LocalizedValue.class) annotation, or it should scan the classpath for @Embeddable annotation and all those that have it.