Mapping multi-Level inheritance in Hibernate with Annotations
问题 Take the situation listed in this question: Mapping multi-Level inheritance in Hibernate How would this mapping be done with Annotations rather than an hbm file? 回答1: What specifically are you having trouble with? Mapping class hierarchy via joined subclasses is pretty straightforward: @Entity @Inheritance(strategy=InheritanceType.JOINED) public class A implements Serializable { ... } @Entity public class B extends A { ... } @Entity @PrimaryKeyJoinColumn(name="A_ID") public class C extends A