Articles tagged with "HABTM"
Alternative Methods for Working with hasAndBelongsToMany Associations
As of 1.1.12.4205, CakePHP's current functionality for working with HABTM associations works very well for most applications, particularly those that lend themselves well to using multiple-selectTags or checkboxes. This article looks at proposed methods for adding or removing join records between two models that don't rely on bulky arrays and that minimize the amount of SQL executed on the database.
[Read more] Create Multiple Checkboxes Instead of a Multiple-Select in your Views
From a usablitiy stand point, multiple-select boxes are a nightmare. Forget to hold down the modifier key when adding an option and you loose all your selections. When the number of options are managable, multiple checkboxs are a better choice for average users. This functionality is coming to cake in future versions but you can have it now with this helper.
[Read more] HABTM Add & Delete Behavior
Many people gripe about the HABTM associations in CakePHP and how difficult it is to add or delete a single record. This behavior takes care of the task for you!
[Read more] Obvious trick to reduce amount of HABTM relationship tables
Trick howto reduce amount of HABTM tables in complex application
[Read more]
Latest Comments