I using a CakePHP with a database like this:
Estudant
|
Test
|
Question
I create the three models. When I execute a find('all',
array(recursive => 3)) the sql select executed in database not uses
any join.
First is executed "select (fields) from estudants", then is executed
one "select (fields) from tests where id = *" where * is the test
foreing key in estudants and then execute ond "select (fields) from
questions where id = *" for all question foreing key in tests.
There is a way to CakePHP execute this with only one sql using inner
join? Because the sql above cause poor performance.
I try to return a model find with recursive =>5 returning 1 register
"find('all', array('recursive' => 5, 'limit' => 1));" because the
complex relationship and the find return in 21 seconds for 1 register.
P.S.: Sorry for my bad english
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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