class Category ...
public $belongsTo = array(
'ParentCategory' => array('className' => 'Categories.Category',
'foreignKey' => 'category_id',
'conditions' => '',
'fields' => '',
'order' => ''));
public $hasMany = array(
'ChildCategory' => array(
'className' => 'Categories.Category',
'foreignKey' => 'category_id',
'dependent' => false));
class Categorized ....
public $belongsTo = array(
'Category' => array(
'className' => 'Categories.Category'));
class Blog...
public $hasAndBelongsToMany = array(
'Category' => array(
'className' => 'Categories.Category',
'foreignKey' => 'foreign_key',
'associationForeignKey' => 'category_id',
'with' => 'Categorized'
I tried adding the 'joinTable' key set to 'categorized' but this made
no difference.
On Dec 30, 9:20 pm, "Larry E. Masters" <php...@gmail.com> wrote:
> Did you define the association correctly? Check that you do not have any
> typos.
>
> --
> Larry E. Masters
>
> On Thu, Dec 30, 2010 at 8:17 PM, john lyles <confidentia...@gmail.com>wrote:
>
>
>
>
>
>
>
> > No. I used the schema shell: cake schema create -plugin categories -
> > name categories
>
> > On Dec 30, 8:56 pm, "Larry E. Masters" <php...@gmail.com> wrote:
> > > did you run the migrations to setup the tables?
>
> > > --
> > > Larry E. Masters
>
> > > On Thu, Dec 30, 2010 at 7:53 PM, john lyles <confidentia...@gmail.com
> > >wrote:
>
> > > > Hi cakers,
>
> > > > I'm using the categories plugin from cakeDC. In the plugin there is a
> > > > model called Categorized and the $useTable variable is set to
> > > > 'categorized'. But when I go to /blogs/add I get the following error:
> > > > Error: Database table categorizeds for model Categorized was not
> > > > found.
>
> > > > What can cause this?
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > others
> > > > with their CakePHP related questions.
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "CakePHP" group.
> > > > To post to this group, send email to cake-php@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>
> > <cake-php%2Bunsubscr...@googlegroups.c om>For more options, visit this
> > group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment