java Programming Glossary: projections.property
How to add Distinct in Hibernate Criteria http://stackoverflow.com/questions/10731723/how-to-add-distinct-in-hibernate-criteria Projections.distinct Projections.projectionList .add Projections.property type type .setResultTransformer Transformers.aliasToBean YourBean.class..
How to get distinct results in hibernate with joins and row-based limiting (paging)? http://stackoverflow.com/questions/300491/how-to-get-distinct-results-in-hibernate-with-joins-and-row-based-limiting-pagi your criteria criteria.setProjection Projections.distinct Projections.property id Now you'll get the correct number of results according to..
Hibernate Query By Example and Projections http://stackoverflow.com/questions/84644/hibernate-query-by-example-and-projections Projections.distinct Projections.projectionList .add Projections.property name name .add Projections.property city city .add Example.create.. .add Projections.property name name .add Projections.property city city .add Example.create usr Like the other poster said.. Projections.distinct Projections.projectionList .add Projections.property name name .add Projections.property city city .add Example.create..
|