HQL 带的连接语句只能是实体与
该实体的属性 进行连接
其意义就是为了优化(通过延迟加载查询关联的属性)需要进行配置

from A left join A.B where (b.flag is null or b.flag='true')

不配置的话不能使用join,只能使用where进行内连接查询,不能使用 where b.aId (+)= a.id 这个是oracle 特有的,HQL 不能用。

相关文章: