In CakePHP if you add created or modified fields to any DB table, then when data is saved or updated it inserts the DATETIME into the fields respectively.
I want to add to this.
I have a function in core.php (app/config/core.php) called isCheap() and can be called anywhere. This function returns either TRUE or FALSE.
I want to extend MODEL so that if any table has an is_cheap TINYINT(1) field it automatically get saved to the value of isCheap().
I looked at the file cake/libs/model/model.php and in the save() function there are many references to created, modified, updated. I am pretty sure this is where it does its magic but the function has a lot going on in it, and I am not sure how I could extend it to add my behavior?