Thanks. I think I'd rather make it part of the default behavior rather
than afterSaving() and adding a second SQL statement.
In that vein, I actually went in tonight and modified the model -
well, in this case I overrode the save() method in my app_model.php
file. Doing some testing I found that there were additional (but
minor) spots in the libs\controller\scaffold.php and libs\view\scaffold
\edit.ctp files that I had to change so that scaffolding would also
support the alternate column names. But in all, the changes were
pretty minor and now I can change the 'created', 'modified' and
'updated' columns to reflect any naming convention I need, simply by
adding these to my model declarations:
var $createField = array('my_create_column');
var $updateField = array('my_update_column');
(I named the properties to be inline with the $displayField property.)
I'll look at writing some tests for this and submitting a ticket with
the fix, and see if the developers are interested. I think that the
devs have done a pretty solid job in making Cake usable with legacy
databases (at least coming in as I have to v1.2). This is one of the
few 'must-haves' (IMO, obviously) to make using legacy DBs seamless.
(And the fewer roadblocks for using legacy DBs, the better - and the
bigger audience cake can support.)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---