I have tried in every different way. Read many many articles, But could not get an answer. Please Help !!!
Problem - maxRows get overwriiten by null(actually they are not copied over) in QueryTranslatorImpl
This is where i create a query and call getSingleResult()
Method getSingleResult which sets the Max result to 2 (code -query.setMaxResults( 2 ) )
and then call query.list() for answer.
Class - org.hibernate.ejb.QueryImpl (JAR - hibernate-entitymanager-3.4.0.GA)
So when getSingleResult is called, it sets the max rows to 2. Now the problem is maxResult always gets overwritten by null.
queryParametersToUse = queryParameters.createCopyUsing( selection ); - this new selection object copies over Fetchsize and Timeout but not maxResults. Hence the new queryParameters does not have value 2.
There is a log warning ( log.warn( "firstResult/maxResults specified with collection fetch; applying in memory!" ); ) about it but i could not understand it.
Class - org.hibernate.hql.ast.QueryTranslatorImpl (JAR -hibernate-core-3.3.1.GA.jar)
posted 11 years ago
Any ideas guys !!!
Does anyone have any idea on this log message . I think it can lead us to the answer ----
I guess it means - if my query consists of fetch( my query consists of 3 left join fetch), it would not persist over my maxRows result.
I am totally blocked on this issue. Please let me know if anyone has any thoughts, ideas, suggestions on it.
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Devious Experiments for a Truly Passive Greenhouse!