Daan de Wit, sure that's the ideal case. But the problem lies with the fact that the limit handler implementations were never designed to work with CTE queries for any dialect, not just SQL Server. Secondly, we've considered the idea of providing the LimitHandler implementations a better representation of the SQL query (more like an AST-tree) that would allow the handlers to inject fragments without having to necessarily fully re-parse the SQL string. If its something you critically need, you're welcomed to submit a PR for us to review with the changes to support CTE queries for SQLServer2005Dialect. |