Top "Criteria" questions

Mechanism typical to ORM frameworks that allows the creation of queries against a database in a dynamic and object-oriented fashion.

How to paginate a JPA Query

I have a submission table with columns like ID, Name, Code among other properties. My requirement is to search for …

java jpa orm pagination criteria
Complex queries with JPA Criteria builder

Can someone suggest me how to build up the following query using JPA Criteria builder API? SELECT id,status,created_…

java jpa criteria builder
Hibernate Criteria: distinct entities and then limit

I have a criteria that returns all data the application requires, basically: Criteria criteria = session.createCriteria(Client.class); criteria.createAlias("…

java hibernate group-by criteria
Using hibernate criteria, is there a way to escape special characters?

For this question, we want to avoid having to write a special query since the query would have to be …

java database hibernate criteria escaping
NHibernate - CreateCriteria vs CreateAlias

Assuming the following scenario: class Project{ public Job Job; } class Job{ public Name; } Assuming I want to use the Criteria …

performance nhibernate criteria icriteria
Subquery in select clause with JPA Criteria API

I'm trying, as in title, to insert a subquery in select clause like in this simple SQL: SELECT id, name, (…

jpa select subquery criteria
Hibernate Criteria for "in subselect"

I'm trying to do something like this, but using Criteria instead of HQL: select user from User where user in ( …

hibernate nhibernate subquery criteria
hibernate criteria with exists clause

I cannot find a solution to a problem that seems to be easy. Say there are 2 entity classes: class A { …

java hibernate criteria
Hibernate Criteria Limit mechanism?

Hibernate Criteria support provides a setMaxResults() method to limit the results returned from the db. I can't find any answer …

java sql hibernate criteria
How do add NOLOCK with nHibernate?

How do you add NOLOCK when using nhibernate? (criteria query)

nhibernate fluent-nhibernate criteria