Hibernate version: 3
Mapping documents:
<class name="Person" table="person"> ... <set name="visits" lazy="false" inverse="true" > <key column="person_id"/> <one-to-many class="Visit"/> </set>
</class>
<class name="Visit" table="visit"> ... <property name="dateOf" type="date" not-null="false"/> <many-to-one name="person" class="Person"/>
</class>
So as you can see from the code , I have two objects , one Person which contains a set of many Visits . The visit object has a dateOf field which is a date . I would like to sort / order the Set of visits in the person object based on the dateOf field .
How can this be done ?
Anticipated Thanks ,
Cosmin
|