Top "Hql" questions

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

HQL: How to select all entities distinct by some column?

A simple question: In this example I need to retrieve all objects, but these objects must have distinct msgFrom fields. …

hibernate hql
How to write a query in hibernate for count(*)

I want to execute the below query in Hibernate? select count(*) from login where emailid='something' and password='something'

hibernate hql
passing list to IN clause in HQL or SQL?

I get List<Strings> by executing a query. This must be passed to another query of IN clause …

java hibernate hql in-clause
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
No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode HQL

I have the HQL where I trying to get artifacts that have no classification (when active is 0) artifacts = Artifact.findAll("…

java hibernate grails hql
how to return Map<Key, Value> with HQL

i have a table Permission: id name desc what i am doing right now is to make a query that …

hibernate hql hibernate-mapping
Hibernate Named Query Using Like and % % operators?

In my Hibernate JPA Sample code.. public List<AttendeesVO> addAttendees(String searchKeyword) { TypedQuery<AttendeesVO> query = entityManager.…

java hibernate jpa hql
Using a CASE statement in HQL select

Is there any way to do the following in HQL: SELECT case when flag = true then SUM(col1) else SUM(…

nhibernate hibernate hql
Hibernate HQL delete with and

Hibernate doesn't delete my row: public boolean deleteVote(Login user, int pid){ Session session = getSession(); try{ String hql = "delete from …

hibernate hql hql-delete
How do I write hql query with cast?

I need to combine 2 tables using hql, both are having common column, but table1 common column is integer and table2 …

java hibernate hql