suppose Object A has a list of Object B, and Object B must have a object C, B can be order base on C.level .
In A.hbm.xml
<bag name="listB"
table="T_B"
inverse="false"
order-by="?? what should i do here???"
>
<key column="ID_A" not-null="true"/>
<many-to-many column="ID_B" class="B"/>
</bag>