class A implements Serializable{
private static final long serialVersionUID = 1L;
@Id
Integer id;
...
// constructor getter and setter
}
@Entity
class B extends A{
private static final long serialVersionUID = 1L;
@Column
String name;
@Column
String age;
...
//constructors, getters and setters
}
正如您在上面看到的,类
A
继承自类B
,B
应该从A
继承标识符id
。但是我得到了No identifier specified for entity: com.d.e.B
的错误提示。请问我错过了什么?谢谢。