I want to have always the same order in the collections/sets that hibernate returns from the POJOs getters.
Because hibernate always returns the collection elements in a random way.
How can i generate POJOs (from the reverse engineering) with @Sort annotation and SortedSets?
Example:
I have the
Code:
Person
POJO that has the method
Code:
Set<Contact> getContacts()
but i want to generate with the reverse engineering something like this
Code:
@Sort(type = SortType.Natural)
SortedSet<Contact> getContacts()
Is it possible ?? How ?
Thanks,