Fixed. The problem was that the model is within a plugin.
$this->loadModel('Settings.Setting');
Thanks!!!
On 17 feb, 14:06, "Dr. Loboto" <[email protected]> wrote:
> Does it really loads this model? Simplest check is by class name:
> pr(get_class($this->Setting));
>
> On 17 фев, 15:36, pablosky <[email protected]> wrote:
>
> > Hello.
>
> > I have a controller that using another model . And save some data:
>
> > $this->loadModel('Setting');
> > $this->Setting->saveAll($settings['Settings']['Setting']);
>
> > The model is this:
>
> > class Setting extends SettingsAppModel {
> > var $name = 'Setting';
>
> > function afterSave()
> > {
> > Cache::delete('settings');
> > Cache::delete('settings_menu');
> > }
>
> > }
>
> > The problem is not running afterSave when you load the model using
> > loadModel.
>
> > Any ideas?
>
> > Thanks
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php