hibernate - JPA @MappedSuperclass and JPAMetaModelEntityProcessor -
i have following scenario:
1) abstract @mappedsuperclass composite pk:
@mappedsuperclass @equalsandhashcode(of = { "id" }, callsuper = false) public abstract class localizeddetail { private static final long serialversionuid = 1l; @embeddedid @getter @setter private localepk id; (...)
2) pk:
@embeddable @equalsandhashcode @allargsconstructor @noargsconstructor public class localepk implements serializable { private static final long serialversionuid = 1l; @column(name = "id", length = 256) @getter @setter private string id; @column(name = "locale", length = 16) @getter @setter private string locale; }
3) localizeddetail sub class:
@entity @table(name = "bt_value_object_info") public class valueobjectinfo extends localizeddetail { (...)
4) generating jpa meta model through maven using org.hibernate.jpamodelgen.jpametamodelentityprocessor plugin.
what happening localepk metamodel being generated without attributes:
@generated(value = "org.hibernate.jpamodelgen.jpametamodelentityprocessor") @staticmetamodel(localepk.class) public abstract class localepk_ { }
but if set localepk composite pk of other entity not extends localizeddetail generated correctly. need create "fake" entity class generate metamodel.
is there known limitation model generate correct pk meta-model?
thanks,
Comments
Post a Comment