Re: [smartweb-devel] Hibernate hql,sql query slow pagination
Brought to you by:
rlogiacco
From: svetrini <st...@gm...> - 2007-11-06 19:46:52
|
I vote for the solution with the count method and to adding packages to smartweb (waiting for hibernate patch, obviously!) good work Gaetano Perrone wrote: > > Until hibernate group answer to our patch request I suggest a vote for one > of the following solution : > I remember all that the problem is to modify a given hibernate query(hql > or sql query) to count the results without extracting it. > The problem that requires the hibernate patch is the retrieving of the > query parameters for a given hibernate query, because of the protected > visibility of the getNamedParams(), getTypes(),getValues() (positional > parameters). To solve the problem there are two approch: > > 1. Make the protected methods getNamedParams(), getTypes(),getValues() on > the AbstractQueryImpl hibernate class public. > > 2. Adding on the hibernate QueryImpl SqlQueryImpl final class a public > count() method in addition to list(), uniqueResult() methods. > > For each approch there was anothere choice to do until hibernate group > approves the patch: > > a) adding an org.hibernate(needed only by the second solution with the > patched Query class ) and org.hibernate.impl (with the patched > AbstractQueryImpl class for the first solution and the QueryImpl and > SQLQueryImpl for second solution)package to smartweb framework > > b) Provide for smartweb user's that would use fast hql/sql pagination an > zip file with the patch to apply to hibernate jar as an external resource. > > I suggest a vote for the 2 choices. I hope u answer soon... > > -- View this message in context: http://www.nabble.com/Hibernate-hql%2Csql-query-slow-pagination-tf4751460s17546.html#a13614378 Sent from the SmartWeb Developers mailing list archive at Nabble.com. |