|
From: Jeremy T. <jth...@us...> - 2007-04-18 03:36:50
|
I'm not sure I understand all of your problem, but we once had a problem that was caused by another request calling setMaxResult on the hibernate template.... Those templates are shared, and you need to create a new one for any request that is going to modify the template settings, such as setMaxResults.... otherwise, this request (or a single query on this request) will set max results to 6, and then another query on the same or next request will only display six results when you're expecting many more. Jeremy Thomerson On 4/17/07, saneera gunasekara <sa...@gm...> wrote: > > hi > i want to do hibernate paging > and i use criteria query for that ,and my criteria query got duplicate > records > and then i used setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY) method > to avoid that > after i used setFirstResult and setMaxresult > bt it wouldnt working my search result has 45 recoreds and but it showing > 6 records only > without using setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY) method > it works fine but getiing duplicate records > how can i avoid duplicate record and paging witout above issues > > > pls help me > thanks > best reguards > Saneera > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |