Msofts
Msofts

Reputation: 87

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 ?

Upvotes: 2

Views: 237

Answers (2)

anonymous coward
anonymous coward

Reputation: 12814

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.

Upvotes: 1

jimiyash
jimiyash

Reputation: 2494

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'

Upvotes: 0

Related Questions