문제

Is @Inheritance,@DiscriminatorValue,@DiscriminatorColumn applicable to @MappedSuperClass ?


Question is asked because In ORM.XML JPA Specification Entity have attribute :

     "inheritance",
    "discriminatorValue",
    "discriminatorColumn",

but MappedSuperclass does not have .

도움이 되었습니까?

해결책

No, they're not applicable. MappedSuperclass is used for code reuse, and not for entity inheritance. It's only used to share common properties and methods between entities that have, otherwise, nothing in common.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top