I'm using the latest cakephp (downloaded it a moment ago).
I have created the 'categories' table and database connection works
just fine.
If I add in the model class the $useTable variable, the error
"Database table category s for model Category was not found." goes
away:
Heres the model code:
<?php
class Category extends AppModel {
var $name = 'Category ';
var $useTable = 'categories';
}
?>
Any idea what is going on?
Many thanks in advance!
On Nov 17, 11:31 pm, teknoid <[EMAIL PROTECTED]> wrote:
> Either you are using some really really old release of cake,
> or you did something incorrectly.
>
> Cake will look for 'categories' table for a Category model by default.
>
> On Nov 17, 4:35 pm, introvert <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > Its CategorIES instead of CategorYS.
>
> > The error I get:
>
> > Error: Database table category s for model Category was not found.
>
> > Or should this work for sure?
> > In my case it doesnt.
>
> > If not, how to associate the database categories with the model/
> > controller (since it think the name is categorys)
>
> > On Nov 17, 10:26 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Mon, Nov 17, 2008 at 7:22 PM, introvert <[EMAIL PROTECTED]> wrote:
>
> > > > Hello,
>
> > > > I have recently came acrros cakephp and I'm not very familiar with it
> > > > yet.
>
> > > > I made a model:
> > > > category.php (Category)
>
> > > > which I want to associate with controller:
> > > > categories_controller.php (CategoriesController)
>
> > > That is exactly how cake works.
>
> > > > but this wont happen due to differences in names Category ->
> > > > Categories (plural form).
>
> > > No, exactly the inverse.
>
> > > > What should I do in such case to make it work?
>
> > > Nothing, just read the docs: book.cakephp.org
>
> > > HTH,
> > > - Dardo Sordi.
>
> > > > Many thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---