From: Mariusz F. (JIRA) <nh...@gm...> - 2011-04-26 09:20:53
|
paged join fetch with OpenStatelessSession always results the same rows regardless of SetFirstRow parameter ----------------------------------------------------------------------------------------------------------- Key: NH-2676 URL: http://216.121.112.228/browse/NH-2676 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.1.0 Reporter: Mariusz Florek Priority: Major I tested results of HQL query using standard and stateless session: from Customer c join fetch c.Orders as o left join fetch o.OrderLines as ol join fetch ol.Product p order by c.CompanyName I tried to limit result count using SetFirstResult(...) and SetMaxResults(...) on IQuery object. For test I used MsSql2008DialectLinqReadonlyCreateScript.sql from NHibernate 3.1.0-GA zip with binaries. With standard session I got proper results - with stateless session I always got first N (set with SetMaxResults) objects regardless of value set with SetFirstResult. Additionally query ran with stateless session consumed twice execution time (although I expected it to be faster). Problem exists also with simpler join example: from Customer c join fetch c.Orders order by c.CompanyName BTW - how NHibernate process such queries (how resolves page to read - I can see only not limited SQL generated)? Cheers, Mariusz -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |