Hi,
I was wondering what the problem would be if Hibernate would pick up the Comparator instance (class) used for it's Set.
I have declared a Set like:
Code:
private SortedSet<Order> deals = new TreeSet<Order>(new CloseDateDescComparator());
Because Hibernate replaces the SortedSet implementation with it's own, i lose the Comparator. This can as far as i see, only be resolved by setting the sort atribute on the set.
Code:
<set name="deals" sort="CloseDateDescComparator">
Are my assumptions right. If so why can't hibernate pick up the comparator from the initialized TreeSet before it replaces it.
If this can be done easier, please let me know as well.
cheers,
Raphael