Thursday, February 2, 2012

Re: Is there a way to disable before callbacks in model->read method

No, I just want to avoid beforeFind callback method getting called.

See: http://book.cakephp.org/1.3/en/view/1048/Callback-Methods

On Thu, Feb 2, 2012 at 10:25 AM, sen li <arserangel@gmail.com> wrote:
callbacks?
Is it mean that you want to disable the relations for example hasMany,hasOne,manyToMany,belongTo,and so on?

thanks!



2012/2/2 thatsgreat2345 <thatsgreat2345@gmail.com>
If you do model->find('first') you can disable callbacks in the second
parameter.
model->find('first',array('callbacks'=>false))

On Feb 1, 9:44 pm, ceap80 <cea...@gmail.com> wrote:
> I need *NOT TO *fire before callbacks when using model read method.
>
> Is there a way to achieve that or do I need to change my model->read() by
> model->find('first')

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php



--
Cesar Arguinzones

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: