我有同样的课程:
public class DoctorCalender {
private Long reservationId;
private Date reservationDate;
private String hospitalName;
private String roomName;
private Long capacityId;
private List<Shift> shifts = new ArrayList<>();
. . .
public List<Shift> getShifts() {
return shifts;
}
public void setShifts(List<Shift> shifts) {
this.shifts = shifts;
}
}
我将使用此方法将hql导出映射到上面的类:
.setResultTransformer(Transformers.aliasToBean(DoctorCalender.class))
我收到此错误:
调用属性的setter时出现IllegalArgumentException [ir.sayar.hospital.toolBox.helperClass.DoctorCalender.shifts(expected type = java.util.List)]