The reason for this problem is that the SUBSELECT strategy uses only the sql up to the order by clause, but doesn't respect parameters that might come in the order by or other clauses. I am planning to work on the subselect strategy as part of reworking the limit handling in 6.0. In the meantime you can either use a literal value instead of the parameter, or a different fetch strategy. |