Hey guys, I was just thinking about this yesterday. I have by no means done any research on this at all, so... just throwing it out there
What about a journal table (fieldnames: id, model_name, model_id, data)? And before saving a record with the updated values, you save a serialized array of the existing record values in the journal table? That way you can view a history of any record, and maybe even use something like phpdiff to see the differences stupid idea or? On Jan 16, 2:42 pm, Adam Royle <[EMAIL PROTECTED]> wrote: > I am also interested in something like this. The tricky thing for me > to understand is how associations would be stored as well. Ideally it > would be great to be able to see a history of models and their > associated models without overwriting the "HEAD" revision. My > reasoning behind this is to have an easy way to implement multiple > drafts of models, without having to rewrite my controllers/views much > (or at all). This functionality could be used in a CMS for preview and > approval functionality. > > On Jan 16, 8:42 pm, francky06l <[EMAIL PROTECTED]> wrote:> Hi bakers, > > > I am wondering if someone already implemented an "historic" or > > "journal" with cake. Actually my need is to be able to keep trac of > > the changes on a record. > > Ideally, each modification would a journal_id and I could roll back > > the journal to restore the data at any points. > > I have been searching the MySql triggers for this, but seems that > > performances are affected a lot. > > I have written a "small" behavior for it, but I am not 100% satisfied > > with this. > > If you have experimented something, I would be glad to know how to > > handle this (maybe another DB is better?). > > > Another question; I haven;t check the code of the 1.2 beta for this : > > is the transactional mode fully implemented or I need a behavior for > > it ? > > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---