Well, or you just use Model::delete() with the cascade parameter set to true. This is the cakephp way to do it, no need to add another wrapper method, since Model::delete already is the wrapper for this method...

Kind regards
Thomas

Am 19.09.2011 10:38, schrieb Zaky Katalan-Ezra:
It looks like a bad design.
Why declaring a function protected if you want to use it outside of descendant classes. Create a public function deleteDependent() in the behavior and call _deleteDependent() from this function

On Mon, Sep 19, 2011 at 10:32 AM, #2Will <[email protected] <mailto:[email protected]>> wrote:

    Hello

    I am trying to use Mariano's soft delete plugin with cakephp 2.0 but
    have come accross  little problem

    "Call to protected method Model::_deleteDependent() from context
    'SoftDeletableBehavior' "

    so thats "$model->_deleteDependent($id, $cascade);" on line 102

    This error is because as per the migration guides comments, there are
    now visibility keywords for model methods.

    so, how can i access these methods from the behaviour?

    Thanks for any help.  it would be really usefull to get this working
    as its a behaviour im sure lots of people use a lot.

    Will

    --
    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]
    <mailto:cake-php%[email protected]> For more options,
    visit this group at http://groups.google.com/group/cake-php




--
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com <http://www.IGeneriX.com>
Sites.IGeneriX.com <http://Sites.IGeneriX.com>
054-7762312
--
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

--
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

Reply via email to