注解用在父类上,不映射表。
@MappedSuperclass
public class DataEntity<T> extends BaseEntity<T> {
private static final long serialVersionUID = -5091191915732924502L;
@Id
@GeneratedValue
@DocumentId
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}