org.springframework.web.util.NestedServletException:处理程序调度 失败;嵌套异常是java.lang.Error:未解析的编译 问题:方法setTblDepartment(TblDepartment)中的类型 TblProject不适用于参数(Long)
public void setFkDeptIdForProject(Long projectId, Long departmentId) {
TblProject existProj=projectDAO.get(projectId);
TblDepartment dept= new TblDepartment();
dept.setPkDepartmentId(departmentId);
existProj.setTblDepartment(dept);
projectDAO.update(existProj);
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "fk_department_id")
public TblDepartment getTblDepartment() {
return this.tblDepartment;
}
public void setTblDepartment(TblDepartment tblDepartment) {
this.tblDepartment = tblDepartment;
}