Hi,
Before I start: creating a user with an email gives no problem, but
updating a user, gives a validation error: 'email left blank'.
I have this array and I want to save the updated data
Array
(
[User] => Array
(
[firstname] => data[User][firstname]
[lastname] => data[User][lastname]
[address] => data[User][address]
[zip_code] => dat
[city] => data[User][city]
[country_id] => 149
[gender] => 2
[age] => 55
)
[Email] => Array
(
[0] => Array
(
[email] => [email protected]
)
)
)
I do the following things to update it:
$this->User->read(null, $this->authUser['User']['id']);
$this->User->Email->save($this->data) && $this->User->save($this-
>data);
I couldn't even get saveAll method to work well.
The user saves well, but the email gives a validation error, that it
is empty (cannot be left blank).
The relationship is as follows: user has many emails.
What am I doing wrong? Cake thinks, the email is left blank, but in
fact it isn't.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---