CakePHP hasOne ineffeciency?
- by Andre
I was looking at examples on the CakePHP website, in particular hasOne used in linking models.
http://book.cakephp.org/view/78/Associations-Linking-Models-Together
My question is this, is CakePHP using two queries to build the array structure of data returned in a model that uses hasOne linkage?
Taken from CakePHP:
//Sample results from a $this-User-find() call.
Array
(
[User] => Array
(
[id] => 121
[name] => Gwoo the Kungwoo
[created] => 2007-05-01 10:31:01
)
[Profile] => Array
(
[id] => 12
[user_id] => 121
[skill] => Baking Cakes
[created] => 2007-05-01 10:31:01
)
)
Hope this all makes sense.