propelorm/Propel — pull request #265 by rozwell (2012-01-22 19:36:33+00:00)
Title: Added optional condition to AggregateColumn behavior

This is a simple change which allows to add condition to AggregateColumn behavior.
It adds your piece of sql code to the query.

This is how the schema looks like:
```xml

```

And created method:
```php
prepare('SELECT COUNT(status) FROM unit WHERE status=1 AND unit.INVESTMENT_ID = :p1');
$stmt->bindValue(':p1', $this->getId());
$stmt->execute();
return $stmt->fetchColumn();
}
```

Of course you can do the same via overriding the compute method but... why if you can do that in schema with less code?