Tag Archive > CakePHP

HowTo: CakePHP addContain() for all models

mashpie » 03 September 2009 » In howto » No Comments

As of CakePHP 1.2 Behaviours came up and people started working with the “Containable” (see http://book.cakephp.org/view/474/Containable). In brief you get much better control over associations and selects on theses in find operations. But when associations grow up in your datamodel things might get overhauling. You’ll have to keep exiting associations while adding contains to your query. This can be simplified by adding an addContain()-Method to your models.

Continue reading...

Tags: , ,