Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which version of Propel 1.6.7+ is introducing lower case for column name in *Map class? #1056

Open
gedeh opened this issue Mar 21, 2018 · 1 comment

Comments

@gedeh
Copy link

gedeh commented Mar 21, 2018

Hi,

Thank you for maintaining Propel 1.* branch for so long, very much appreciated it! You guys doing an excellent work!

This is more of a question rather than issue. Recently I tried to help my friend to upgrade his good old Symfony 1.4 project which uses sfPropelORMPlugin to latest dependencies. When I reach to the stage of upgrading sfPropelORMPlugin, the tests start to failing.

I see the cause is in the project it uses Criteria and addSelectColumn(SamplePeer::SAMPLE_COLUMN_NAME); extensively to perform various select query which it can't be done using the OOTB query object.

After a $item = BasePeer::doSelect($criteria)->fetch(); is executed, it iterates the result and use capital case as the column name such as $item['SAMPLE_COLUMN_NAME'];. After upgrade to latest Propel, these kind of codes needs to be changed to $item['sample_column_name']; instead.

Then I looked into sfPropelORMPlugin changes and see it recently changed its Propel dependency from 1.6.7 to 1.7.1.

Can you let me know which version of Propel between 1.6.7 and 1.7.1 is actually change the behaviour of base objects (*Map, *Peer, and Base*) creation that now it use lower case instead of the previous capital case?

For example in generated SampleTableMap.php, it becomes

$this->addColumn('sample_column_name', 'SampleColumnName', 'VARCHAR', true, 100, null);

which previously it was

$this->addColumn('SAMPLE_COLUMN_NAME', 'SampleColumnName', 'VARCHAR', true, 100, null);

If its the case, then probably no harm to specify that that specific version is no longer backward compatible, or is there a suggestion how the Criteria and BasePeer::doSelect($criteria) should be used to avoid this?

Thanks!

@gedeh gedeh changed the title Which version of Propel 1.6.7 + is introducing lower case for column name in *Map class? Which version of Propel 1.6.7+ is introducing lower case for column name in *Map class? Mar 21, 2018
@gedeh
Copy link
Author

gedeh commented Mar 21, 2018

Seems I found this commit which causes the issue:
a2ff295 - Fix case sensitivity

which resolved issue #496 - [Postgresql ] dev-master broken - case sensitive problem

Is the BC break is intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant