It is possible, but it involves using a couple of Cake's features on
which there isn't a great deal of documentation.
The first thing to do is override Cake's error handler using
app/app_error.php. Specifically, you want to override the missingTable
method. Then, in each model, you need to create a property that maps
all the tables field names to the column types.
var $fields = array(
'id' => 'primary_key',
'title' => 'string',
'body' => 'text',
'created' => 'datetime'
);
The column types are based on the $columns array in the database
drivers, and an example of using this can be found in the Bake script.
Then, in your overridden error class, you create the table, and resume
normal execution.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---