Top "Hibernate-criteria" questions

The Criteria interface of Hibernate ORM , represents a query against a particular persistent class.

How to join Multiple tables using hibernate criteria where entity relationship is not direct?

I have three entities. those are: @Entity public class Organization { @Id private long id; @Column private String name; } @Entity public …

java sql join 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
Hibernate Join using criteria and restrictions

I have 2 entities as PayoutHeader.java @Entity public class PayoutHeader extends GenericDomain implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private …

java hibernate hibernate-criteria
Hibernate Restrictions.in vs. Disjunction

Other than less code, what is the difference between the following two approaches to building an IN clause using the …

hibernate hibernate-criteria restrictions
Hibernate Criteria join query one to many

I have a Cat class and a Owner class. A cat has one owner but an owner can have many …

hibernate hibernate-criteria
Hibernate criteria: how to order by two columns concatenated?

I have a Person table which has two columns: first_name and last_name. The Person class has two corresponding …

java hibernate hql hibernate-criteria
Using Hibernate's Criteria and Projections to Select Multiple Distinct Columns

Using Hibernate's Criteria, I want to execute the equivalent of: select distinct uspscity, state from citycomplete where USPSCITY = 'HOUSTON' I …

sql hibernate criteria distinct hibernate-criteria
How to create Criteria on field that can be null?

I have to create create Criteria or Criterion on specific field myProperity (on class MyClass). I have to choose all …

hibernate hibernate-criteria
getting first row of table by criteria query

How can I get the first row of a table by using criteria or HQL query? Table creation script CREATE …

hibernate hql hibernate-criteria
How to use Hibernate Criteria objects for multiple and/or conditions

I need to create a Hibernate criteria restriction that ors 3 Conditions. The problem is that the last condition is acutally …

hibernate-criteria