I have a relationship of one department to many students expressed as following:
StudentCode:
<hibernate-mapping>
<class name="com.example.Student" table="STUDENTS" where="active = 'Y'">
...
</class>
</hibernate-mapping>
DepartmentCode:
<hibernate-mapping>
<class name="com.example.Department" table="DEPARTMENTS">
...
<set name="students>
<one-to-many class="com.example.Student" />
</set>
</class>
</hibernate-mapping>
When I run this code, a department returns all students including ones where
active != 'Y' (it disregards the information in the student mapping). Is this expected behaviour? I thought that the where condition on the student mapping would force only the active ones to be returned. I am using 3.2.5.