Hello Everyone
Hibernate 3.0
I have a named query that is executed like :
Query q = session.getNamedQuery("stat.between.dates");
q.setDate(0, startDate);
q.setDate(1, endDate);
Now when I list like q.list, I get the size of the list as 830 which is the right count. However when I iterate the list I get null for all entries in the list (the 830). Any help is appreciated. I do n't know even how to troubleshoot this thing. The query looks correct, and most important is the number of members of this list. It does match what the query should return back; I mean the number of matches.
The way I get the list is q.list().
Iterator it = q.iterate();
MyObject ob = null;
while(it.hasNext()){
ob = (MyObject) it.next();
System.out.println(ob); ---> output null
}
Thank You
|