两个对象:学生表:Student课程表:Course两者的关系是多对多,当查询Student对象,并以Course对象作为条件时的sql语句写法如下:select pa from Student pa inner join pa.Courses as course where course.name='数学'