有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java IllegalArgumentException spring引导和hibernate

我有同样的课程:

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

我得到了这个错误:

IllegalArgumentException occurred while calling setter for property [ir.sayar.hospital.toolBox.helperClass.DoctorCalender.shifts (expected type = java.util.List)]


共 (0) 个答案