No still it won't work.
I have 3 Models having following association:
Model1 hasMany Model2
Model2 belongsTo Model1
Model2 hasMany Model3
Model3 belongsTo Model2
I had primary key value of Model1 and want to retrieve All Information
from Model3.
But
$this->Model1->contain( 'Model2',
'Model2.Model3'
)
won't give me Data from Model3,Instead it shows blank array.
On Wed, Aug 27, 2008 at 7:34 PM, Guillaume <[EMAIL PROTECTED]>wrote:
>
> $this->Model1->contain(array('Model2"=>"Model3"); should work.
>
> $this->Model1->contain( 'Model2.Model3'); too
>
>
> http://bakery.cakephp.org/articles/view/bindable-behavior-control-your-model-bindings
>
> Guillaume
> --
> http://cherryonthe.popnews.com
>
>
> On 27 août, 14:49, vj <[EMAIL PROTECTED]> wrote:
> > I have 3 Models having following association:
> >
> > Model1 hasMany Model2
> > Model2 belongsTo Model1
> > Model2 hasMany Model3
> > Model3 belongsTo Model2
> >
> > I had primary key value of Model1 and want to retrieve All Information
> > from Model3.
> >
> > But
> > $this->Model1->contain( 'Model2',
> > 'Model2.Model3'
> > )
> >
> > won't give me Data from Model3,Instead it shows blank array.
> >
> > Can any one resolve this.
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---