[Catalyst] updating $c->user at runtime
Wijnand Wiersma
wijnand at nedbsd.nl
Tue Feb 7 13:57:05 CET 2006
Op 7-feb-2006, om 13:49 heeft Jess Robinson het volgende geschreven:
> No, it's not the same. Your $person (result of search), is a
> ResultSet,
> which allows updates via hashref. The user->user obj is just a Row,
> whic
> does not (update just updates dirty_columns), so you need to set them
> individually like so:
>
> foreach my $col (keys %$valid_result) {
> $c->user->user->set_column($col, $valid_result{$col});
> }
> $c->user->user->update;
Yes, that works!
well, some small modifications were needed:
foreach my $col (keys %$valid_results) {
$c->user->user->set_column($col, $valid_results->{$col});
}
$c->user->user->update;
Thanks to all of you, and especially to Jess ;-)
Wijnand
More information about the Catalyst
mailing list