I got it to work.

Needed to use 'className' in the association options as 'Agg.Profile'.

On Thursday, 17 January 2013 18:19:18 UTC-5, Mathew wrote:
>
> Hi,
>
> If I have a hasMany association for my plugin's model, then it's not being 
> linked to the model during execution of a test.
>
> class User extends AggAppModel
> { 
>    public $name = 'User';
>    public $hasMany=>array('Agg.Profile');
>    public function doSomething()
>    {
>        $this->Profile->find('all');
>    }
> }
>
>
> The $this->Profile>find(..) will cause a member function find() on a 
> non-object. In the debugger for $this it has no associated model object 
> attached to it.
>
> Why?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to