Hi guys. Sometimes, to made the joins using only one query, I've used the "joins" inside find method, but I saw Mark's article using bindModel and unbindModel. Now my question is: What's the difference using bind or unbindModel, instead the "joins" array inside the find method ?!
Regards. Thiago Elias. 2009/7/31 AD7six <andydawso...@gmail.com> > > > > On Jul 31, 9:58 am, AD7six <andydawso...@gmail.com> wrote: > > On Jul 31, 12:15 am, Roel <roel....@gmail.com> wrote: > > > > > Ah I like your idea of encapsulating the two finds in a model method. > > > That seems much better than putting the logic in the controller. > > > Thanks. > > > > > Could you please elaborate on the Linkable (and OneQuery) behavior? > > > Anything with regard to optimizing database performance for related > > > models seems relevant to me. > > > > Given that A belongsTo|hasOne B belongsTo|hasOne C belongsTo|hasOne D > > belongsTo|hasOne E etc. > > > > you'll get n queries with cake, and 1 query using Linkable/OneQuery. > > They're used in a similar fashion to containable. > > > > Cheers, > > > > AD > > The article by Mark descibes how you can do it by hand > http://mark-story.com/posts/view/using-bindmodel-to-get-to-deep-relations > > Cheers, > > AD > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---