/ Published in: Groovy

see also http://floledermann.blogspot.com/2007/10/solving-hibernate-criterias-distinct.html
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import com.lempa7.demandlempa.* import com.lempa7.demandlempa.enums.* import org.hibernate.Session import org.hibernate.SessionFactory import org.hibernate.criterion.* SessionFactory sessionFactory = ctx.sessionFactory //.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY) .setFirstResult(0).setMaxResults(5) .add( Restrictions.eq("status", TextOrderStatus.UNASSIGNED) ) criteria.list()
Comments
