PS.  When I say prevent, I'm refering to stopping the section still
appearing in the parent down drop down box on its own edit page.

On 7/3/07, michaelmcandrew <[EMAIL PROTECTED]> wrote:
>
> Hi, I have a belongs to condition that applies to a Section model that
> references itself for its parents.  I
>
> var $belongsTo = array(
>                 'Parent' => array(
>                         'className'=>'Section',
>                         'foreignKey'=>'parent_id',
>                 )
>         );
>
> I want to be able to stop a parent being its own child. I thought
> adding the following condition would prevent that.
>
> 'conditions'=>'Section.parent_id'!=Parent.id'.
>
> But it doesn't.  Can anyone tell me what I am doing wrong?
>
> Thanks,
> Michael
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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