[smartweb-devel] Hibernate hql,sql query slow pagination
Brought to you by:
rlogiacco
From: Gaetano P. <gpe...@sm...> - 2007-11-05 12:53:55
|
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#a13586351 Sent from the SmartWeb Developers mailing list archive at Nabble.com. |