Johannes
Johannes

Reputation: 599

CakePHP: Need DB table for every controller?

I'm a newbie to CakePHP but got strange error. I'm just testing it, how to implement many functions and got strange error. I have created a controller called about and got the following error:

Error:  Database table abouts for model About was not found.

Does CakePHP require to have DB table for every single controller?

var $useTable = false; is not working.

I am using CakePHP 1.2.5

Upvotes: 1

Views: 1785

Answers (2)

dfens
dfens

Reputation: 5515

you should add about method to your main application controller

Upvotes: -4

Michael Anderson
Michael Anderson

Reputation: 73490

Try using this in your controller

var $uses = array();

The $usesTable = false idiom is used in models that don't have associated tables.

Upvotes: 13

Related Questions