Hi Preloader and thanks for the fast answer.
I now added some more hidden fields and used the right name setting.
<?=$form->input('Customer.id', array('type'=>'hidden'));?>
<?=$form->input('Customer.user_id', array('type'=>'hidden'));?>
<?=$form->input('User.id', array('type'=>'hidden'));?>
This way the validation array looks like this:
Array
(
[User] => Array
(
[email] => [EMAIL PROTECTED]
[id] => 9
)
[Customer] => Array
(
[firm] => -
[first_name] => Xxx
[last_name] => Xxx
[street] => Xxxx
[nr] => 8
[plz] => 01234
[ort] => Xxxx
[id] => 8
[user_id] => 9
)
)
I now tried 2 different validations with this array and both fail and
tell me, that the email already exists.
Those 2 are:
NR1:
-------
$cleandata = $this->htmlchars($this->data);
$this->User->data=$cleandata;
$this->Customer->data=$cleandata;
if($this->User->validates($cleandata) && $this->Customer-
>validates($cleandata)) { ... }
NR2:
-------
$cleandata = $this->htmlchars($this->data);
$this->User->data=$cleandata;
$this->Customer->data=$cleandata;
if($this->Customer->User->validates($cleandata) && $this->Customer-
>validates($cleandata)) { ... }
As I said above both of them fail.
I did not try saveAll() yet because I have to make the validation work
first.
Greetings worthy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---