select *
from student s
left join s.course
where s.id='2' and s.course.status='active'
代码内容
select *
from Cat as cat
inner join fetch cat.mate
left join fetch cat.kittens
一个fetch连接通常不需要被指定别名, 因为相关联的对象不应当被用在 where 子句 (或其它任何子句)中。同时,相关联的对象 并不在
查询的结果中直接返回,但可以通过他们的父对象来访问到他们。
697

被折叠的 条评论
为什么被折叠?



