Generator builds invalid queries #567

Open
torstenzander opened this Issue Jan 18, 2013 · 7 comments

3 participants

@torstenzander

In the findPkSimple Method in the BaseQuery Classes. We have a query like:

$sql = 'SELECT ARTICLE_ID, BRAND_ID FROM article_brands WHERE ARTICLE_ID = :p0 AND BRAND_ID = :p1';

This works fine with mysql but MSSQL does not like this syntax and throws an error because of the ``.

@marcj
Propel member

Hm, I can't see any ` in your sql?

@torstenzander

Sorry they are removed but you see them in the generated class.

@willdurand
Propel member

well, the MSSQL platform uses [] for quoting things, did you configure the right db vendor?

@torstenzander

with 1.6.2 ist was working fine and we did not change any config. But what do you mean with "right db vendor" ?

@willdurand
Propel member

Specifying MSSQL in the config.

And, actually identifier quoting was never used before.

@torstenzander

yes the config is fine. We downgraded to 1.6.2 and everything is running fine. None of the higher versionsworked. I am not sure since you implemented the findPkSimple but it seems to have somthing to do with it.

@willdurand
Propel member

try to disable the quoting feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment