两个表classes和student,classes可以包含多个学生,String hql = "from Students where classses =:classses";这个是根据班级查学生,这个对吗?还有根据学生查班级怎么写??多谢多谢
1条回答 默认 最新
jasondyoung 2016-12-10 14:43关注//根据班级查 from Students s where s.classes = :classes //因为不知道你的实体的具体映射是怎样,这样写,不能看懂就算。 from Classes c where c.students.name = :name本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报