Posts Tagged ‘optimization’
Learn Containable Behavior by Example
In cakephp, adding relationships is easy. We just have to declare the hasOne, belongsTo, hasMany and the famous HABTM relationship to do all the dirty work of joining tables. But declaring them all at once could lead to a slow page.In version 1.1, what we do is utilize the bindModel() and unbindModel(). We do not declare all associations in the Model class yet. This was a good solution. I was looking for this option in version 1.2 and I found the Containable Behavior. Studying containable was a little rough before but there are documents now that are really helpful.
Read the rest of this entry »
Tags: containable, optimization

