0

When i run the ./cake bake all command i get the following error:

my sql in connection stat Running with xampp -

how to fix this problem ?

1 Answer 1

0

Cake expects there to be a table that corresponds to every Model class. The standard format for the table names is the pluralized version of the model name. It is failing because you don't have a table cates, which is the plural form of your model Cate.

You can get around this by specifying what table you want the model to use by setting $useTable in the model.

Cate Model:

$useTable = 'categories'
3
  • your mean difference between uppercase and lowercase name table ?
    – vu.martin
    Jun 1, 2017 at 17:40
  • I am using cakephp 2.5.5 console
    – vu.martin
    Jun 1, 2017 at 17:47
  • table names should be lowercase, but I don't think that's your issue. its looking for a table that doesn't exist. you need to either rename the table or set the $useTable property in the model.
    – bill
    Jun 1, 2017 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.