Let's say I have the following tabaelas
products
tags
manufacturers
So I have 3 models. One for each table. Each model is configured with the following scheme:
Product Model - > belongsTo: trademarks Branding model - > belongsTo: manufacturers
Until then I just modeled the data issue.
Now if I make the following command in any controller, assuming my model of the product tables is called ProductModel and my BrandModel tag
$this->Produto->find('first')
I will receive something like:
array(
[Product] => array(
// dados dos produtos
[Brand] => array(
// dados das marcas
)
)
)
That is, the manufacturer's data did not come even though it belonged to the Brand model.
Is there any way for this result array to be 3 levels, ie the Manufacturers model come together within the Brands array?
Something that is NATIVE of CakePHP, without having to do two queries and merge them