Hi,
I did this extension for AR to save the user and timestamp when created, updated or deleted (logical delete) only when the table have those fields.
Also it covers the save of the MANY_MANY relation with the help of a little widget.
The widget works like this:
<?php
$this->widget('application.extensions.FormState.FormState', array(
'items'=>array(
'relateds'=>array(
'relationName'=>array(false, 'relatedModelName'),
),
)
));
?>
The "false" tells to the save of relation if it uses the first or not (second) of the fk attrib id.
Good enough? Helps?
Paul
PS:
ARExtended update with a little fix when deleting old relations and added Form model save (you have to add the 3rd param in FormState, the id of the parameter lists in the form model)