java - Hibernate @Any Annotation and Multiple Join Columns (ie: Composite Key) -
is possible use hibernate @any annotation when object being mapped has composite key? have tried following annotation combination:
@any(metacolumn = @column(name = 'meta_column')) @anymetadef(idtype = 'string', metatype = 'string', metavalues = [ @metavalue(value = 'v1', targetentity = object1), @metavalue(value = 'v2', targetentity = object1), @metavalue(value = 'v3', targetentity = object2) ]) @joincolumns([ @joincolumn(name = 'column1'), @joincolumn(name = 'column2'), @joincolumn(name = 'column3') ])
unfortunately results in
org.hibernate.mappingexception: property mapping has wrong number of columns: ca.package.class type: object
Comments
Post a Comment