Articles tagged with bindModel
Keeping bindModel and unbindModel out of your Controllers
Sometimes you need to fine-tune your associations: binding to other Models only when needed or unbinding exisiting relations to minimize the size of your result set. With a very simple method and a slight change in how you write some associations, this can be done cleanly and efficiently right from your controller.
[Read more] An improvement to unbindModel on model side
Not long ago I saw Tom OReilly's great tutorial entitled "Keeping bindModel and unbindModel out of your Controllers." While he showed us some great tips I was not so comfortable having to define my model relations in a different way, but I still wanted the possibility to only specify what relations I want to get when querying a model.
[Read more] Bindable Behavior: control your model bindings
With the birth of CakePHP 1.2 pre-beta, here comes the newly, improved, and extended version of Bindable, a method to easily control what model relationships are obtained from a find operation, and even customize binding settings.
[Read more] Filter Out Unnecessary Recursive Relationships
Add a small function to your AppModel to filter out those recursive relationships that are unnecessary for a particular controller action.
[Read more]
Latest Comments