I have an application that I'm developing in symfony 2 with doctrine. The problem I'm facing is the slowly changing dimension.
For example I have three Entities: Dossier, Payout and PayoutCategory. Dossier has a many to one relationship with Payout and Payout a many to one relationship with PayoutCategory.
The important part is the relation between a Payout and a PayoutCategory. The PayoutCategory contains 2 important fields: ceiling and procentual. The ceiling describes the maximum allowed payout of a dossier. Since a dossier can have serveral payouts of the same PayoutCategory all these payouts are counted together and multiplied by the procentual field. The total of the calculation is either smaller or equal to the ceiling if not ceiling value is returned. Now if either the ceiling or procentual (or the name) field gets updated the previous made dossiers are also changed. So my question is there a bundle out there that handles this problem? Because I have several relationships similar to this one.
I have tried the builtin doctrine loggable behaviour and the EntityAuditBundle but they don't solve this. Although they add a version field to PayoutCategory the version field is just to track changes of the entity itself. In fact I need the version field as part of the relationship (foreign key in Payout) between Payout and PayoutCategory.