propelorm/Propel — pull request #635 by arvenil (2013-03-22 11:38:06+00:00)
Title: Always quote aliases

Hi,

With this patch column aliases are properly quoted so we can use aliases like "Book Title" without getting SQL syntax error.
https://github.com/arvenil/Propel/pull/new/always-quote-aliases#L2R126
https://github.com/arvenil/Propel/pull/new/always-quote-aliases#L4R931
https://github.com/arvenil/Propel/pull/new/always-quote-aliases#L5R457

It uses the same qouting method as defined in DBAdapter::quoteIdentifier($text).

It also fixes hacky quoting in ModelCriteria which was adding it's own quoting mechanism and it always uses for qouting double quote ignoring DB specified quoting defined in DBAdapter::quoteIdentifier($text). Now alias quoting is done directly in Criteria the same way as table names are quoted.
https://github.com/arvenil/Propel/pull/new/always-quote-aliases#L4L941
https://github.com/arvenil/Propel/pull/new/always-quote-aliases#L4L970
There is also one thing which requires a note. I've removed two assertions as I think they bring nothing to the tests and they were in different/wrong way than other tests.

The problem was they were trying to run query against mysql were tests in this file are prepared for sqlite. I you wish I can preserve those two assertions with some hacks but since those test already test generated SQL I don't see point to do that.

All old (some after adjusting them) and new tests run properly https://travis-ci.org/arvenil/Propel