How can I select all distinct rows in hibernate with all data?
If I use this way only IDs will be selected but I need all rows with their data
session.createCriteria(MyClass.class, "c")
.setProjection(Projections.distinct(Projections.id()))
If I use another approach it will not be performed on sql level but filtered after. That's is not good solution if I need to upload 10 000 rows.
.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY)