title: Doctrine many to one relationship versioning
body: <p>I have an application that I'm developing in symfony 2 with doctrine. The problem I'm facing is the slowly changing dimension. </p>
  
  <p>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.</p>
  
  <p>The important part is the relation between a Payout and a PayoutCategory. The PayoutCategory contains 2 important fields: <em>ceiling</em> and <em>procentual</em>. The ceiling describes the maximum allowed payout of a dossier. Since a dossier can have serveral payouts of the <strong>same</strong> 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.</p>
  
  <p>I have tried the builtin doctrine <a href="https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/loggable.md" rel="nofollow">loggable behaviour</a> and the <a href="https://github.com/simplethings/EntityAudit" rel="nofollow">EntityAuditBundle</a> 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.</p>