Criteria « JDBC « JPA Q&A

1. Criteria API returns a too small resultset

How is this possible, I have to following criteria

Criteria criteria = getSession().createCriteria(c);
List list = criteria.list();
The size of list is now 20. If I add a max results to the criteria,
Criteria criteria ...

2. Hibernate Criteria

Hello every one, can someone could help me? i have a problem while doing a sub query: here is the script : DetachedCriteria subInfo = DetachedCriteria.forClass(ActReg.class) .createAlias("ActType", "t") .createAlias("Incident", "i") .add(Restrictions.eq("t.Id", 158)) .setProjection("i.Id")); Criteria critInfo = session.createCriteria(IncData.class) .add(Restrictions.between("DateLogged",st_date,end _date)) .add("Id",subInfo)); the output is : java.lang.String cannot be cast to java.lang.Integer Thank you for any help

3. Using Filters with Criteria: JDBC param index out of range

Newbie Joined: Fri May 27, 2005 10:45 am Posts: 6 Hi, The problem below occurs with both Hibernate 3.0.5 and Hibernate 3.1 rc2. I tested it with two different databases: Sybase and HSQL DB and the same problem occurs. It seems that there is a problem when you use the Criteria API and when there is a filter enabled. The problem ...