Top "Criteria" questions

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

Hibernate criteria: Joining table without a mapped association

I'd like to use Hibernate's criteria api to formulate a particular query that joins two entities. Let's say I have …

java hibernate hql criteria
Get record with max id, using Hibernate Criteria

Using Hibernate's Criteria API, I want to select the record within a table with the maximum value for a given …

java hibernate criteria
JPA2: Case-insensitive like matching anywhere

I have been using Hibernate Restrictions in JPA 1.0 ( Hibernate driver ). There is defined Restrictions.ilike("column","keyword", MatchMode.ANYWHERE) which …

java criteria eclipselink jpa-2.0 hibernate-criteria
How do I use a complex criteria inside a doctrine 2 entity's repository?

Lets say I have a table that holds information about festivals. Each festival has a start and end date. I …

php sql doctrine criteria doctrine-orm
UNION to JPA Query

Is it possible to query "UNION" in JPA and even "Criteria Builder"? I'm looking for examples, but so far i …

java jpa criteria
How to achieve "not in" by using Restrictions and criteria in Hibernate?

I have list of category. I need a list of category by excluding 2,3 row. Can we achieve through hibernate by …

hibernate criteria restriction
LIKE restriction from the Hibernate Criteria API

I am trying to query PostgreSQL database using Hibernate's restriction criterion like() with a partial keyword: Criterion c1 = Restrictions.like("…

hibernate criteria
setResultTransformer in Criteria

What is the use of setResultTransformer method in criteria API? Can someone explain this with a simple example? I read …

hibernate criteria hibernate-criteria
How do you order a oneToMany join table in hibernate criteria

Say I have a class Mother with a oneToMany mapping to Kittens @Entity @org.hibernate.annotations.Entity(dynamicUpdate = true) @Table(…

hibernate criteria
Combining conditional expressions with "AND" and "OR" predicates using the JPA criteria API

I need to adapt the following code example. I've got a MySQL query, which looks like this (2015-05-04 and 2015…

java mysql jpa criteria