Top "Hibernate-criteria" questions

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

hibernate.jpa.criteria.BasicPathUsageException: Cannot join to attribute of basic type

I have two tables: Tax and TaxRule. There is one column same in both table i.e TAX_RULE_ID. …

java oracle hibernate jpa hibernate-criteria
Referencing outer criteria query aliases from within an SQLProjection

I am aware that you can use {alias} to refer to the root entity within an SQLProjection: Projections.sqlProjection("MIN({…

java hibernate hibernate-criteria
Query @ElementCollection JPA

I have an Entity Transaction as following : @Entity class Transaction extends AbstractEntity<Long>{ private static final long serialVersionUID = 7222139865127600245…

java spring hibernate jpa hibernate-criteria
How do I resolve "Unable to resolve attribute [organizationType.id] against path" exception?

I'm using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, JUnit 4.8, and JPA 2.0 (hibernate-jpa-2.0-api). I'm trying to write a query and search based …

hibernate jpa entitymanager hibernate-criteria
Could not get a field value by reflection getter

I'm trying to filter a result set by a foreign key: createCriteria(Person.class).add(Restrictions.ne("position", 1L)).list() …

java hibernate hibernate-criteria
How to make HIbernate fetch all properties of root entity and only specific properties of associated entity?

I have root entity Hostel and its single association User owner. When I fetch Hostel entity I need to eagerly …

java hibernate hibernate-criteria
How to test Hibernate criteria queries without using any database?

I'm developing a Java application with lots of complex Hibernate criteria queries. I would like to test these criteria to …

unit-testing hibernate-criteria
Hibernate criteria query multiple criteria

In my current project I've faced a problem of getting entities with hibernate criteria query. I have the following entities: …

java hibernate hibernate-criteria
Hibernate, getting duplicate values

I am writing a very simple query, but I am getting duplicate values for some reason. Criteria cr = session.createCriteria(…

java hibernate criteria jbpm hibernate-criteria
How to filter an entity in hibernate with hibernate filters

I need to filter an entity in a list of objects, for example: public class Student { private int id; private …

java hibernate hibernate-mapping hibernate-criteria hibernate-filters