propelorm/Propel — pull request #279 by grandbora (2012-02-05 17:34:10+00:00)
Title: Fix issue #227 :  Small change in ModelCriteria, to make it work with peer constants

This patch fixes the [issue#227](https://github.com/propelorm/Propel/issues/227) @hades200082.
AFAIU, ModelCriteria->select() method doesn't work with column name constants of model's Peer Class.

```php
// this works
$c = new \Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(AuthorPeer::FIRST_NAME);

// this doesn't work
$authors = AuthorQuery::create()
->select(AuthorPeer::FIRST_NAME)
```

I made a small change in ModelCriteria->getColumnFromName() method to overcome this problem.
Another point is, the [issue#227](https://github.com/propelorm/Propel/issues/227) complains about "setDistinct()" method but the actual problem (if I am not mistaken) is in "getColumnFromName()" method. It just doesnt support column names in "tableName.ColumnName" format and this is what I added. Lastly this format may be unsupported by design, you can ignore the changes if this is the case :)