| Hi everybody!
 I'm using Hibernate(3.3.1GA)  with ojdbc14(10.2.0.3) on ORACLE(10.2.0.3) and get an unbelievable problem.
 
 I like using Named Parameters in HQL as it supports Collections to be set. But I found hibernate only return 10 rows even though I set query.setFirstResult(0);query.setMaxResults(20);, and I'm sure there are more then 10 rows in DB.
 
 More Detail:
 1, Debug on line query.list();, query.selection displays firstRow=0, maxRows=20;  but query.list() only return 10 items;
 
 2, Looking for parameters set into sql from V$SQL_BIND_CAPTURE, it shows rownum=0;
 
 3, alter system flush shared_pool,  query.list() return 20 rows;
 
 4, turn on the oracle sql_trace, query.list() return 20 rows;
 
 5, turn off the oracle sql_trace, query.list() return 10 rows;
 
 6, turn off the oracle sql_trace, debug on line query.list(), looking for oracle sessionId and serialNumber from query, then turn on the sql_trace on the session used by hibernate. query.list() return 20 rows;
 
 It seems that it's the problem of oracle, but I'm not sure, does anybody knows?
 
 
 |