In one of my mapped classes, I have a field Setmapped to a DB through sleep mode. Now I need this collection to sort according to some logic that I wrote in the new implementation Comparator. I changed the type of the field to SortedSet, added this Comparatoras an attribute for my sleep mode mapping (XML, without annotations), assuming that Hibernate retrieves all the objects from the database, and then sorts using the specified one Comparator.
The employee explained that there is a strike price, since Hibernate actually uses insertion sorting, that is, it calls the method comparemany times for each loaded object. It's true? Are there any other performance issues to match the sorted collection?
Yuval source
share