Commit 129394ce authored by Darren Trethewey's avatar Darren Trethewey

SQL Server doesn't like the quoted alias for doctrine_rownum and fails when...

SQL Server doesn't like the quoted alias for doctrine_rownum and fails when setting setMaxResults() and setFirstResult() in query, returning an error like "Conversion failed when converting the varchar value 'doctrine_rownum' to data type int. (severity 16)"
parent e5377453
......@@ -704,7 +704,7 @@ class SQLServerPlatform extends AbstractPlatform
$start = $offset + 1;
$end = $offset + $limit;
$query = "SELECT * FROM (SELECT ROW_NUMBER() OVER ($over) AS \"doctrine_rownum\", $query) AS doctrine_tbl WHERE \"doctrine_rownum\" BETWEEN $start AND $end";
$query = "SELECT * FROM (SELECT ROW_NUMBER() OVER ($over) AS doctrine_rownum, $query) AS doctrine_tbl WHERE doctrine_rownum BETWEEN $start AND $end";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment