Reputation: 17
I have a MYSQL table being produced and populated by another program that I have no control over, The problem is that the table name is all upper-case "AFTER_HOURS", and if i use
class ah extends AppModel {
var $name = 'AFTER_HOUR';
var $primaryKey = 'ID';
var $displayField = 'ID';
}?>
i get the error:
Error: Database table a_f_t_e_r__h_o_u_rs for model Ah was not found.
Im still new to cake, how can i resolve this??
THANKS
Upvotes: 1
Views: 687
Reputation: 29141
To specify what table a model should use, do this in your model:
var $useTable = 'AFTER_HOUR';
Details here: http://book.cakephp.org/1.3/view/1059/useTable
Upvotes: 3