Thanks for the tip Travis. I will definately look into that!

On Aug 6, 5:50 pm, Travis L <[email protected]> wrote:
> Taff,
>
> Remember if you want to use Tag::find using conditions from the Dolist
> table, you can use the Containable behavior.  It's kind of like being
> able to set recursion levels with a high degree of precision, as well.
>
> On Aug 5, 10:25 am,Taff<[email protected]> wrote:
>
> > You are the man Brian. Thanks for your help. It was (at least
> > indirectly) related. I set recursive to 1, was over the moon, that it
> > was working, followed an impulse to set it back to 0...and it still
> > works, even after a cache clear and apache restart.
>
> > No matter, I'm chuffed to bits!
> > Cheers,
> >Taff
>
> > On Aug 5, 6:21 pm, brian <[email protected]> wrote:
>
> > > Try setting 'recursive' => 1 in your find params.
>
> > > On Wed, Aug 5, 2009 at 11:33 AM,Taff<[email protected]> wrote:
>
> > > > Firstly Brian, thanks for the reply.
> > > > I'm getting the Dolist return correctly. It just doesn't seem to find
> > > > the Tag
>
> > > > Array
> > > > (
> > > >    [Dolist] => Array
> > > >        (
> > > >            [id] => 1
> > > >            [name] => A first list
> > > >            [order] => 1
> > > >            [created_on] => 2009-07-25
> > > >        )
> > > > )
>
> > > > Cheers,
> > > >Taff
>
> > > > On Aug 5, 4:09 pm, brian <[email protected]> wrote:
> > > >> Actually, I think that should be
>
> > > >> Array
> > > >> (
> > > >>    [0] => Array
> > > >>    (
> > > >>        [Dolist] => Array
> > > >>        (
>
> > > >> What result do you get? Anything?
>
> > > >> On Wed, Aug 5, 2009 at 7:34 AM,Taff<[email protected]> wrote:
>
> > > >> > I'm getting nowhere, so I'll try and outline my setup in the hope 
> > > >> > that
> > > >> > someone can help me out.
>
> > > >> > I have a Model called dolist.php
>
> > > >> > var $hasAndBelongsToMany = array(
> > > >> >                'Tag' => array(
> > > >> >                        'className' => 'Tag',
> > > >> >                        'joinTable' => 'dolists_tags',
> > > >> >                        'foreignKey' => 'dolist_id',
> > > >> >                        'associationForeignKey' => 'tag_id',
> > > >> >                        'unique' => true
> > > >> >                )
> > > >> >        );
>
> > > >> > My dolists table has this setup:
>
> > > >> >            [id] => 1
> > > >> >            [name] => A first list
> > > >> >            [order] => 1
> > > >> >            [created_on] => 2009-07-25
>
> > > >> > I have a model called tag.php
>
> > > >> > var $hasAndBelongsToMany = array(
> > > >> >                'Dolist' => array(
> > > >> >                        'className' => 'Dolist',
> > > >> >                        'joinTable' => 'dolists_tags',
> > > >> >                        'foreignKey' => 'tag_id',
> > > >> >                        'associationForeignKey' => 'dolist_id',
> > > >> >                        'unique' => true
> > > >> >                )
> > > >> >        );
>
> > > >> > My tags table looks like
>
> > > >> >            [id] => 1
> > > >> >            [name] => Tag 1
>
> > > >> > I have a table called dolists_tags
>
> > > >> > id      dolist_id       tag_id
>
> > > >> > According to all the tutorials I have attempted to follow
>
> > > >> > $lists=$this->Dolist->find();
>
> > > >> > should return:
>
> > > >> > Array
> > > >> > (
> > > >> >    [Dolist] => Array
> > > >> >        (
> > > >> >            [id] => 1
> > > >> >            [name] => A first list
> > > >> >            [order] => 1
> > > >> >            [created_on] => 2009-07-25
> > > >> >        )
> > > >> >    [Tag] => Array
> > > >> >        (
> > > >> >            [0] => Array
> > > >> >                (
> > > >> >                    [id] => 1
> > > >> >                    [name] => Tag 1
> > > >> >                )
> > > >> >        )
> > > >> > )
>
> > > >> > I have a feeling I'm missing something elementary, and hopefully
> > > >> > someone with more experience can help me take advantage of the great
> > > >> > functionality that cakePHP offers.
>
> > > >> > Cheers,
> > > >> >Taff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to