from 学生 st join st.班级 join st.院系
如果有条件的话
where st.班级='1班' and st.院系='计算机系'
select s.*,c.className,d.departmentName from student s,class c,department d where s.classId = c.classId and s.departmentId = d.departmentId;
对象里如果设了many-to-one的关系,只要查出学生对象就能导航到其它一的一方的对象的