In Cakephp numeric model name convention
i have att_2010_masters table.
and Att2010Master model.
but it is not working.
Is naming convention开发者_如何转开发 of model is ok ?
and
what can i do to take numeric value in my table name ?
Though not a thorough answer, I believe that the naming conventions would say that your tables should be att2010_masters
.
I, personally, work on a CakePHP project that has models like Preapp105dItem
, where the filename is preapp105d_item.php
, and the database table is named preapp105d_items
.
I don't believe that Cake puts a separation between the letters/numbers. Think of them as just more lowercase letters on the end of the first group.
I think it would be better if you named the model normally, without the numbers and just use the $useTable property in the model.
var $useTable = 'att_2010_masters'
精彩评论