I'd like to use an order bag or use a list index with a column in the referenced table.
As an example:
Class A has a collection of object of class B. Class B has the attribute orderCriteria. I'd like to have in the object of class A, the collection of objects of class B, ordered by the orderCriteria which belongs to B.
Code:
<hibernate-mapping>
<class name="A">
<bag order-by="???.orderCriteria">
[...]
</class>
</hibernate-mapping>
Code:
<hibernate-mapping>
<class name="B">
<property name="orderCriteria">
</class>
</hibernate-mapping>
Any suggestion where I could find information?