Well, I see this as an application issue - not a framework issue. I personally have not developed an application where a change history like this is needed (although I can see the importance in your case).
As an individual model problem you could add fields : "active", "activate_date", "deactivate_date" and use this to determine which row is the current one, without removing the older ones. With a Model Behaviour this would not be too difficult to get working pretty much automatically (ie have model functions for activate(), deactivate(), and intercept beforeFind to add appropriate conditions). But, you would need to add these fields to every model table, and what if you want a "deactivate_reason", "deactivate_administrator_id", and multiple histories for the same person? For a more all encompassing solution, perhaps have another model called History, which has fields "foreign_model", "foreign_id", "active", "activate_date", "deactivate_date" etc. Each of your application models will hasMany History, based upon the History's foreign_model and foreign_id. Again, a Model Behaviour might be the best bet (or in AppModel, if it applies to all), to modify the beforeFind conditions to get the current active rows. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
