我在休眠注释超类的子类中有两个布尔值以及其他几个属性:
private Boolean currentLoan;
private Boolean unpaidFine;
@Column(name="current_loan")
@NotNull
public Boolean hasCurrentLoan() {
return currentLoan;
}
public void setCurrentLoans(boolean currentLoan) {
this.currentLoan = currentLoan;
}
@Column(name="unpaid_fine")
@NotNull
public Boolean hasUnpaidFine() {
return unpaidFine;
}
public void setUnpaidFine(boolean unpaidFine) {
this.unpaidFine = unpaidFine;
}
当hibernate创建表时,除了这两个之外,子类的其他属性在超类的表中显示为列。我注意到其他属性不是Boolean类型。我在这里做错了什么?