I am developing an app using the CakePHP framework. I just recently read an article that said enabling
var $persistModel = true;
could lead to performance gains. As I am working on a development server I thought I'd give it a try. Lo and behold the site was slightly faster at the cost of losing form automagic. For example, all users have group_ids, but instead of the form input being displayed as a drop-down, it was a simple textfield. However, when I disabled $persistModel
form automagic worked as normal once again.
I have made sure to set a variable called $groups
in the view, and the User model has a proper $belongsTo
association.
Does anybody have any insight as to why this might be happening? Is there a way I can use $persistModel
and form automagic at the same time? I'm obviously missing something here.
Thanks a lot!
-wes