SyntaxFix
Write A Post
Hire A Developer
Questions
if you want to use ORDER BY, just add:
criteria.setProjection( Projections.distinct( Projections.projectionList() .add(Projections.id()) .add(Projections.property("the property that you want to ordered by")) ) );