Commit 10be52ae authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #306 from shaneneuerburg/master

[DBAL-497] Fixed SQL Server platform replacing 'FROM' in column names during limit
parents 4485d196 139298a6
......@@ -845,7 +845,7 @@ class SQLServerPlatform extends AbstractPlatform
}
//Replace only first occurrence of FROM with $over to prevent changing FROM also in subqueries.
$query = preg_replace('/\sFROM/i', ", ROW_NUMBER() OVER ($over) AS doctrine_rownum FROM", $query, 1);
$query = preg_replace('/\sFROM\s/i', ", ROW_NUMBER() OVER ($over) AS doctrine_rownum FROM ", $query, 1);
$start = $offset + 1;
$end = $offset + $limit;
......
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