Hi guys,

I've a confusing problem here:

my model:

--------------------------------------

class MenuStructure extends AppModel
{
        var $validate   =       array('root_struct_id'  => array('required' => 
array
(true)),
                                                'parent_struct_id'      => 
array('required' => array(true)),
                                                'struct_id'                     
=> array('required' => array(true)),
                                                'file_name'                     
=> array('required' => array(true))
                                        );
}

--------------------------------------

in the controller i call:

if ($this->RequestHandler->isPost())
{
   $this->MenuStructure->create($this->data);
   if ($this->MenuStructure->validates() && $this->AnotherModelBla-
>validates())
   {
      $this->MenuStructure->save($this->data);
   }
}

-------------------------------------
$this->data:

Array
(

    [MenuStructure] => Array
        (
            [root_struct_id] => 1
            [struct_id] => 4
            [parent_struct_id] => 1
            [navi_level] => 1
            [file_name] => fghf.test
        )

    [AnotherModelBla] => Array
        (
            [... some stuff here ...]
        )
)

------------------------------------

after spending some time i found out that MenuStructure fails to
validate...
As you can see, all required fields for MenuStructure are set...after
some debugging in cakes core i found that the 'blank' rule is
triggered on MenuStructure->validates() and, of course, fails, as the
fields are not blank...so, the question is: why does is the blank-rule
triggered? And how can i avoid it without changing the cakecore?

and btw: in cake/libes/model/model.php, line 2151 (RC2), line 2202
(RC3):
$this->exists();
What effect does this call have in this context? As far as i see, the
call returns a boolean to the void o_O ?






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