IllegalArgumentException spring boot和hibernate

时间:2018-02-05 09:28:31

标签: java spring hibernate illegalargumentexception

我有同样的课程:

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)]

0 个答案:

没有答案