我有两个实体类都在关系中。我在下面的代码中跳过注释部分和剩余字段。
class Employee{
Department department;
}
class Department{
String departmentName;
}
当我尝试在本机 sql 查询中访问部门名称时,出现错误未知列。查询是
select * from employee where employee.department.departmentname=?; 我如何访问子类实体?有人请帮帮我。
我有两个实体类都在关系中。我在下面的代码中跳过注释部分和剩余字段。
class Employee{
Department department;
}
class Department{
String departmentName;
}
当我尝试在本机 sql 查询中访问部门名称时,出现错误未知列。查询是
select * from employee where employee.department.departmentname=?; 我如何访问子类实体?有人请帮帮我。