20.hibernate继承映射single_table
单个表:
person表结构如下:
package com.bjsxt.hibernate;import javax.persistence.DiscriminatorValue;import javax.persistence.Entity;@Entity@DiscriminatorValue("student")public class Student extends Person {private int score;public int getScore() {return score;}public void setScore(int score) {this.score = score;}}