Cakephp model named "Club" not working at all! Reserved keyword? -


In CapeFIF-2.0, I have a model named "Club" and I'm removing it from "Club Controller". If I $ - this-> Club- & gt; When I search inside my controller, it says, "Error: Database Table Club for Model Club was not found." In the stack trace is

. ... clubbs controller.fp (7): model- & gt; Search ('first', array)

The actual database table is called "ClubTable" which I have specified in the class $ useTable = 'ClubTable' . From this I believe that it is automatically making a model called "Club" which is different from my model. Such folder structure:

  /app/Model/Club.php/app/Plugin/Admin/Controller/ClubsController.php   

Kicker here now That is, if I change my model to Club123.php with the model name of "Club123" Then in the controller I just have to go to $ this-> loadModel ('Club 123'); works and it works perfectly to my model and connects to my database and "ClubTable" table.

Is the "Club" somehow a reserved keyword?

To make this issue more confusing, when I'm not using a plugin (make a club controller in the / app / controllers folder) works fine. Summary of the problem:

The model club was not found when calling from within my plug-in, but the model Club123 may not be inside the plugin when the club model can be found.

Any help would be greatly appreciated because I am pulling out my hair Oh, I have removed all the files in the / app / tmp / cache / model / folder.

Check your naming conventions carefully.

In the file system, all names should be lowercase, with the underscores used to separate the word.

In PHP, they should have camel cass.

I was suggesting again to make sure that you know everything properly.

I think setting up and using will clear such issues, as everything is automatically generated :)

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -