I have 2 models product and image. Product has an Has-many relationship with Image. I want to fetch both products and images records based on product id.So I have written the query like this
$this->Product->find('all',array('conditions'=>array('product_id'=>230));
I am getting all product table entries but not image tables records. I checked with var_dump(), then images table entries are coming like this
array('Images =>
array
0 =>
array
...
1 =>
array
... );
What might be the problem? Any help would be appreciated.
Thanks in advance
Pushpa
1 Answer