propelorm/Propel — pull request #482 by CraftyShadow (2012-10-06 19:09:15+00:00)
Title: Improvements to behavior handling, and specifically, AggregateColumnBehavior

This is related to a very old ticket of mine:
http://trac.propelorm.org/ticket/1055

I decided to tackle it and even expand on the original idea. Now multiple `aggregate_column` behaviors can be defined on the same table, and they can even point to the same foreign table.

I came across this use case when we had an object which could be in one of two main states, but they were dependent on multiple conditions. I wanted to have aggregate columns to count the instances of the two separate states, and came accross this Propel limitation (again). This is my attempt at fixing it.

To be honest, I have no good idea how to write good tests for this. Please advice.