Hi Adam,<div><br></div><div>Did you try putting result-set in the variable rather than directly putting it into stash?</div><div><br></div><div>my $user = $c->model('DB::Tech')->find({id => $userid});</div>
<div>$user->update({<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "> id => $username,</span></div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "> firstname => $fname,<br>
lastname => $lname,<br> email => $email,<br> phone => $phone,});</span><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Try this and let us know</span></font></div><div><br></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"></span></font>On Sun, Apr 3, 2011 at 12:07 AM, Adam Jimerson <span dir="ltr"><<a href="mailto:vendion@gmail.com" target="_blank">vendion@gmail.com</a>></span> wrote:</div>
<div><div><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
First of all hello people of the list!<br>
<br>
I am working on my first Catalyst app and need some help updating an<br>
entry from my database.<br>
<br>
$c->stash( users_rs => $c->model('DB::Tech'));<br>
my $user = $c->stash->{users_rs}->find({ id => $userid });<br>
die "No such user: $userid\n" if (!$user);<br>
$c->stash(user => $user);<br>
$c->log->debug('Before update');<br>
$user->update({<br>
id => $username,<br>
firstname => $fname,<br>
lastname => $lname,<br>
email => $email,<br>
phone => $phone,<br>
});<br>
$c->log->debug('After update');<br>
<br>
In the debug output from Catalyst I can see where the "Before update"<br>
gets printed but fails with no error that I can see during the update.<br>
Any help or advice in this matter would be greatly appreciated.<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.11 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
iEYEARECAAYFAk2XbNAACgkQsK1mqepTLy9JNACeIsj8CR0d6utPMLRpgZQEs2+X<br>
N8UAnicZ07JpEK6kCxtwHdYGd+hW6VQt<br>
=NuEZ<br>
-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><span style="font-size:large;line-height:32px">रोहन मल्लेल्रवार</span><div><span style="line-height:32px;font-size:large"><br></span></div><br>
</div>
</div>