0
Suppose I have the following tabaelas
products
brands
manufacturers
Then I will have 3 models. One for each table. Each model is configured with the following schema:
Product model -> belongsTo: trademarks Brand model -> belongsTo: manufacturers
So far I have only modelled the data issue.
Now if I do the following command in any controller, assuming that my model of the product tables is called Productomodel and my brand Marcamodel
$this->Produto->find('first')
I’m gonna get something like:
array(
[Product] => array(
// dados dos produtos
[Brand] => array(
// dados das marcas
)
)
)
That is, did not come the manufacturer data, even though it belongs to the model Brand.
There is some way that this result array is 3 levels, that is, the Manufacturers model comes together within the Tags array?
Something that is NATIVE to Cakephp, without having to make two queries and blend them
I will test here quickly and after doing this point and even leave your answer as best
– user21494