I have a situation where I want to get an ordered list of objects and each object contains a mapped set. I would also like the mapped set to be ordered. If I include both in the order by of my HQL then the proper SQL gets generated and the list of objects gets sorted properly. However, the set collection within each object are not ordered.
I tried adding an order-by clause to my set mapping, however, this seems to override my HQL order by completely. So now the list of objects comes back unordered with the set collection for each object ordered properly.
Is there any way to have both an ordered list of objects, each containing an ordered set collection using either HQL or a setting in the mapping?
Thanks!
|