I have two tables called "Homework" and "Course". There is a property "course_id" in "Homework" as the foreign key joining the table "Course". And I use Hibernate Synchronizer to general the mapping files and DAO classes. The problem is: I want to get all homework of a course by course_id. The mapping script of the column "course_id" is as bellowed:
Code:
<many-to-one
name="Course"
column="course_id"
class="Course"
not-null="true"
outer-join="true"
lazy="false"
>
How to make this query? Thanks very much!