Propel2
Propel2 copied to clipboard
pgsql: Did not apply identifierQuoting="true" to the schema when importing schema from database
Similar to #1478 , I used the "easy mode" to init the schema and model from an existing postgresql database, which all worked fine (barring invalid PHP names being generated, that's another issue).
However, since the schema generation did not add identifierQuoting="true" to the database node, each query dies with a SQLSTATE[42703]: Undefined column error.
Manually adding the setting and rebuilding the model seems to work fine, but why is it missing in the first place? Or rather, if the default is intended to be enabled, why is it not working?
the identifierQuoting="true" does not work on SQLite either
This affects the class generation, in specific the doInsert() method, which makes a query:
$dataFetcher = $con->query("SELECT nextval('MyTable_ID_seq')");
When it should be:
$dataFetcher = $con->query("SELECT nextval('\"MyTable_ID_seq\"')");
This is kinda important, 'cause I'm not able to workaround this with the identifiedQuoting flag (apparently).
Is someone able to make a PR here with suggested changes?