propelorm/Propel — pull request #689 by lcallarec (2013-05-16 17:00:37+00:00)
Title: Fix subquery alias with Oracle

When working with subqueries with the ModelCriteria::addSelectQuery
method, BasePeer::createSelectSql method concatenate an AS keyword
between the subquery and the alias name.
Unfortunately, this is not a valid Oracle syntax, leading in an
"ORA-00933: SQL command not properly ended" error.

The trick is to delegate the table alias management to adapter.

I added a class constant called TABLE_ALIAS_KEYWORD, both in DBAdapter
abstract class and DBOracle to handle this issue and updated
BasePeer::createSelectSql method.