type « HQL « JPA Q&A





1. findAll() Not Returning Correct Object Type    stackoverflow.com

ItemTag objects contain an Item object and a Tag object. (These are Java domain objects.) This simple query works as expected. I get back a list ItemTags and can do all the ...

2. can I specify the return type in the hql words    stackoverflow.com

Hi: I am using hibernate3.6,I meet some problem when do some querying. Take this hql for exmaple:

String hql="select count(distinct ip),sum(bytes) from Entity en where ....
Query q=Session.createQuery(hql);
List<?> list=q.list();
Now I can retrive the columen properties ...

3. How to get NHibernate.Type.IType from a Type?    stackoverflow.com

I try to do the following:

hibQuery.SetParameter("MyParameter", valueObject, valueType);
The only problem is that this method expects NHibernate.Type.IType in the third parameter, but valueType is of type Type. How could I convert this ...

4. Types in HQL.    forum.hibernate.org

5. parameterized user types + HQL = trouble    forum.hibernate.org

Hibernate version: 3.0.5 I've been playing around with custom parameterized user types a bit. I'm using the EnumUserType code from the website (http://hibernate.org/272.html). It works well with CRUD cases, but when you start to use these types with HQL, it seems to fall apart a bit. Say you have an object Glass, which has an enum in it called State. So ...