Top "Criteria" questions

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

truncate/delete from given the entity class

I have my entity class available via a method. I'm trying to figure out, how via the JPA JPQL or …

java jpa criteria criteria-api
Grails/GORM "in" criteria

Is it possible to do an "in" criteria using the GORM criteria. I'm looking for the equivalent of the following …

hibernate grails criteria gorm
Hibernate alias to a simple boolean field

I am struggling with the Hibernate Criteria API. In class Conversation I have: @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true) @JoinTable(…

hibernate alias criteria restrictions
How to create criteria in groovy/grails for nested object?

I need help on creating hibernate criteria for nested object. For example : class office{ Integer id; OfficeDetails cmdData ; } class OfficeDetails { …

hibernate grails criteria
Equivalent of criteria in spring-data-jpa

I was using hibernate but i heard that spring-data-jpa is the best so i try it and i'm satisfy with …

spring hibernate jpa criteria spring-data
NHibernate Criteria select items by the group by and sum of itemid within another table

public class SearchText { public virtual int Id { get; set; } public virtual string Text { get; set; } } public class SearchTextLog { public virtual …

nhibernate criteria aggregate nhibernate-projections
Hibernate: Criteria with collections

I have a problem with hibernate and criterias. I have two Classes: public class Place{ long id; String name; Set&…

java hibernate criteria restrictions
using a ParameterExpression versus a variable in JPA Criteria API

When using the JPA Criteria API, what is the advantage of using a ParameterExpression over a variable directly? E.g. …

java api jpa criteria
Using the 'case...when...then...else...end' construct in the 'having' clause in JPA criteria query

The following criteria query calculates the average of rating of different groups of products. CriteriaBuilder criteriaBuilder=entityManager.getCriteriaBuilder(); CriteriaQuery<…

hibernate jpa criteria criteria-api having
Retrieving Polymorphic Hibernate Objects Using a Criteria Query

In my model I have an abstract "User" class, and multiple subclasses such as Applicant, HiringManager, and Interviewer. They are …

hibernate jpa polymorphism criteria detachedcriteria