Hi,
Maybe you know about doctrines fromArray()-Method, which allows to
create a new record from an array. Unfortunaly, this does not seem
work if you only want to update/edit a record.
So this throws an error:
$user = $this->getUser()->getGuardUser();
$data = array(
"username" => "halla",
"sfGuardUserProfile" => array(
"firstname" => "foo",
"lastname" => "bar"
// and much, much more....
)
);
$user->fromArray($data)->save();
Although this works fine (even if it wont help me, because I've to
update lots of fields... :-)) :
$user->set("username","halla")->save();
So, how do I UPDATE an existing record from an array? Is there an
elegant way to do this?
Thanks for any help,
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---