Top "Named-query" questions

A Hibernate (and NHibernate) feature that allows for both HQL and SQL queries to be written in the mapping document, keyed by a name.

JPQL IN clause: Java-Arrays (or Lists, Sets...)?

I would like to load all objects that have a textual tag set to any of a small but arbitrary …

sql orm jpa jpql named-query
Optional parameters with named query in Hibernate?

Is there any way to specify optional parameters (such as when search parameters are provided from a form and not …

java hibernate orm hql named-query
JPA count NamedQuery

how to get count with a namedquery, without getting all the list (it would increase performance I think). This is …

java jpa named-query
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

I have a method in Dao Class that returns List<Object[]> back and I am using named Query …

java sql oracle named-query
How to make this select * from two joined tables query in HQL form?

I had two hibernate entity here with annotation: @Entity @Table(name = "CLIENT") public class Client { private Long pkClient; private String …

java hibernate hql hibernate-annotations named-query
define named query in orm.xml with jpa and hibernate

I'm trying to put my named queries in my orm.xml (put in META-INF with persistence.xml) but my orm.…

java hibernate orm jpa named-query
Named Query with like in where clause

Is it possible to have a like in a where clause in a named query? I am trying to do …

java sql jpa named-query
How to call Named Query

I wrote a named query in the entity class Voter NamedQuery(name = "Voter.findvoter", query = "SELECT count(*) FROM Voter v …

jpa named-query
Hibernate update with EntityManager

I am using Hibernate 4.1.7 and trying to update object, but theres no documentation how it should be done. Currently, I …

java hibernate named-query hibernate-entitymanager
Hibernate Named Query - join 3 tables

I have 3 beans: Organization, Role, User Role - Organization relation - @ManyToOne Role - User relation - @ManyToMany Organization : @Entity @…

mysql sql hibernate join named-query