I've got a collection that I want to have sorted by a field of another table to which it is related (which maps as a property of another object, incidentally).
I've been trying to work out how this can be done, but the <map> collection mapping allows for <index>, which sorts on a column in the table the collection refers to, or <index-many-to-many> which seems to be for sorting by types (?!) which I can't figure out.
In essence, what I'm trying to do is something like the following:
Code:
<map name="ModuleParameterSets" table="ModuleParameterSets" lazy="true" >
<key column="ProcessID" />
<index column="ModuleIndex" />
<one-to-many class="ModuleParameterSet" />
</map>
...where from the above the index column is found in the Modules table, not the ModuleParameterSets table.
Can something like this be done? I've seen references to foreign-key attributes in the mapping schema, but I can't figure out how to do this.
Help?
Symon.