Example & Tutorial understanding programming in easy ways.

What is the difference between sorted and order collection in Hibernate?

The difference between sorted and order collection in Hibernate:


Sorted Collection:

It is a  collection that is sorted using the Java collections framework. The sorting is done in the memory of JVM that is running hibernate, after reading the data from the database using Java Comparator.


The less the collection the more the efficient of sorting

Ordered Collection:

In the Order collections this  will also sorts a collection by using the order by clause for the results fetched.

The more the collection, the more efficient of sorting.

Read More →