DBAL-497: SQLServerPlatform modifies limit query incorrectly when column names start with "from" #1699

doctrinebot opened this Issue Apr 18, 2013 · 2 comments

2 participants


Jira issue originally created by user shaneneuerburg:

I am working with a table that has columns that start with the word "from" (fromNumber, fromCity, etc). When SQLServerPlatform->doModifyLimitQuery is called, "from" in the names are incorrectly replaced. I suggest adding a whitespace requirement after FROM in the preg_replace on this line:

So this:

$query = preg*replace('/\sFROM/i', ", ROW_NUMBER() OVER ($over) AS doctrine*rownum FROM", $query);

Becomes this:

$query = preg*replace('/\sFROM\s/i', ", ROW_NUMBER() OVER ($over) AS doctrine*rownum FROM ", $query);

Comment created by shaneneuerburg:

Pull request:


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label Dec 6, 2015
@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.4 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment