I am trying to do a fairly simple CakePHP find using the Containable behavior: $comp = $this->Comp->find(\'first\', array(
I am trying to use CakePHP 1.3.5\'s searchable behavior with containable behavior to return search results for a specified model and an associated model (Article belongsTo User).
What I have: \"A\" HABTM \"C\" HABTM \"A\" through join table \"B\" \"A\" hasMany \"B\" belongsTo \"A\"
Like the example in cakephp manual, http://book.cakephp.org/view/1323/Containable#Containing-deeper-associations-1325, i need to fetch data from a model through a condition on its association model.
I use CakePHP 1.2.6 and have the following relations: Showcase HABTM User belongsTo Galleryitem hasOne Image
When using CakePhp would it be advisable to set recursive = -1 in the AppModel class and then use the Containable Behaviour whenever you need a deeper da开发者_C百科ta relationship?
I\'m using the Containable behavior to get a list of Comments (belongsTo Post, which belongs to Question; Question hasMany Post, and Post hasMany Comments; all of these belong to Users).