I managed to find my error that was causing my problem: DBIx::Class::DynamicDefault::update(): Operation requires a primary key to be declared on 'TickIt::Schema::Result::Tech' via set_primary_key at /home/vendion/Projects/TickIt/script/../lib/TickIt/Controller/Admin.pm line 114
Does it make a difference that none of the fields that I am updating is my primary_key on my database? Or is it complaining about the lack of a primary key all together? Rohan M wrote: > Hi Adam, > > Did you try putting result-set in the variable rather than directly > putting it into stash? > > my $user = $c->model('DB::Tech')->find({id => $userid}); > $user->update({ id => $username, > firstname => $fname, > lastname => $lname, > email => $email, > phone => $phone,}); > > Try this and let us know > > On Sun, Apr 3, 2011 at 12:07 AM, Adam Jimerson <vend...@gmail.com > <mailto:vend...@gmail.com>> wrote: > > First of all hello people of the list! > > I am working on my first Catalyst app and need some help updating an > entry from my database. > > $c->stash( users_rs => $c->model('DB::Tech')); > my $user = $c->stash->{users_rs}->find({ id => $userid }); > die "No such user: $userid\n" if (!$user); > $c->stash(user => $user); > $c->log->debug('Before update'); > $user->update({ > id => $username, > firstname => $fname, > lastname => $lname, > email => $email, > phone => $phone, > }); > $c->log->debug('After update'); > > In the debug output from Catalyst I can see where the "Before update" > gets printed but fails with no error that I can see during the update. > Any help or advice in this matter would be greatly appreciated. _______________________________________________ List: Catalyst@lists.scsys.co.uk <mailto:Catalyst@lists.scsys.co.uk> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ > -- > रोहन मल्लेल्रवार > _______________________________________________ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/