Managed to sort this ok.

From: Richard Brown (gmail) 
Sent: Monday, October 31, 2011 11:03 AM
To: [email protected] 
Subject: Paging parameters when Dialect.UserMaxForLimit==true ...
Hi,

I’ve been looking into this:  https://nhibernate.jira.com/browse/NH-2917 

The problem is that we allow code like this:
https://github.com/nhibernate/nhibernate-core/blob/master/src/NHibernate.Test/Hql/Ast/LimitClauseFixture.cs#L90-104
 

The values of the skip/take parameters are passed right through to the final 
query unmodified, but this doesn’t work in any Dialect that has 
UseMaxForLimit==true (like Oracle).  In these dialects, the value used for 
‘take’ needs adjusted.

While I think I can sort this by storing the paging parameters in the 
QueryParameters object at plan-creation-time, then locating all the appropriate 
values and adjusting them before binding them, it starts to feel a little messy.


I was wondering if anyone could think of a more elegant way of handling this?  
(I’m starting to wonder if we need to modify the grammar to make the parameters 
‘special’, and not just regular named-parameters.)


Any thoughts welcome.

Cheers,
    Richard

Reply via email to