Most of my models have an additional property that I was trying to
preload by overloading AppModel constructor.

class AppModel extends Model
        public function __construct() {
                parent::__construct();
                // Load custom property from database and unserialize
value
        }
        public function beforeSave() {
                // Serialize and save custom property to database
        }
}

That broke cakephp when using hasAndBelongsToMany. I filed a bug
report (https://trac.cakephp.org/ticket/6194) but was told that I
shouldn't be overloading AppModel.

Can anyone suggest another simple way to accomplish what I want
without having to write each time $model->initialize(); to preload the
custom property for all the models?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to