Hello,
I wonder if what I ask on the title is possible.
I have an entity which already has an enum property, mapped using GenericEnumUserType. The value of this enum is already enough to define the targetEntity of an @Any property I need to have on this entity as well.
But if I just add the enum property's column as the metaCollumn for the @Any annotation, I receive the following error:
Code:
org.hibernate.MappingException: Repeated column in mapping for entity: my.Entity column: type (should be mapped with insert="false" update="false")
I tried following the error suggestion like this:
Code:
@Any(metaColumn = @Column(name = "type", insertable=false, updatable=false))
But that didn't change anything, same error.
Is there a way to perform such mapping, or must I have a redundant column to define the targetEntity?
Thank you.