nordborg wrote:
It is possible to specify a "sort" or"order-by" attribute in the mappings files. See
http://www.hibernate.org/hib_docs/v3/re ... ons-sorted for examples. This assumes that you always want to use the same order.
You may also consider making the set inverse (eg. setting inverse="true" in the mapping file). But that assumes that you never need to use the set for updating the database.
Exactly! It doesn't need to be updated. We really just want to set a specific order on the set. But then when it's changed, hibernate flags it and if anything else happens, it's re-written to the DB, when all we wanted to do was display it in a different order.
Are you saying that setting inverse = true in the mapping file means it won't save it on reverse sort of any column in the set?
Thanks for the quick feedback! :)