I have a many-to-many Set mapping, and I want to order the set on a property of the associated class.
(Class Member has a Set 'categories' of class Category.. I want this set returned in order by Category.name).
I think I can't use "order-by" in the mapping, because that wants a column name in the table, which in this case is the association table. That's just not gonna work!
I could write a Comparator for class Category that does what I want, and specify it in a <set/@sort> attribute, right? Is that my only choice, or is there a better way?
Thanks a lot,
Mark
|