Top "Hql" questions

Use this tag for questions concerning "Hibernate Query Language" (HQL), a query language used by Hibernate and NHibernate.

How do you do a limit query in JPQL or HQL?

In Hibernate 3, is there a way to do the equivalent of the following MySQL limit in HQL? select * from a_…

java hibernate hql hibernate3
How do you create a Distinct query in HQL

Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other …

hibernate hql distinct
What is the difference between JOIN and JOIN FETCH when using JPA and Hibernate

Please help me understand where to use a regular JOIN and where a JOIN FETCH. For example, if we have …

java hibernate join hql fetch
ORDER BY using Criteria API

When I write a HQL query Query q = session.createQuery("SELECT cat from Cat as cat ORDER BY cat.mother.…

java hibernate sql-order-by hql
HQL Hibernate INNER JOIN

How can I write this SQL query in Hibernate? I would like to use Hibernate to create queries, not create …

java hibernate hql
IN-clause in HQL or Java Persistence Query Language

I have the following parametrised JPA, or Hibernate, query: SELECT entity FROM Entity entity WHERE name IN (?) I want to …

java hibernate jpa hql jpql
JPA and Hibernate - Criteria vs. JPQL or HQL

What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to …

java hibernate hql criteria hibernate-criteria
[Ljava.lang.Object; cannot be cast to

I want to get value from the database, in my case I use List to get the value from the …

java hibernate hql
Difference between INNER JOIN and LEFT SEMI JOIN

What is the difference between an INNER JOIN and LEFT SEMI JOIN? In the scenario below, why am I getting …

sql hql hive
Hibernate HQL Query : How to set a Collection as a named parameter of a Query?

Given the following HQL Query: FROM Foo WHERE Id = :id AND Bar IN (:barList) I set :id using the Query …

java hibernate hql