Re: [Catalyst] Updating a database entry

2011-04-11 Thread Eden Cardim
Francisco == Francisco Obispo fobi...@isc.org writes: Francisco Remember that Catalyst uses DBIx::Class as an ORM. No it doesn't, but you can use DBIx::Class if you want to, or any other ORM, for that matter, given it's perl and you can use whatever modules you want. Francisco so it

Re: [Catalyst] Updating a database entry

2011-04-04 Thread Tomas Doran
On 3 Apr 2011, at 20:25, Adam Jimerson wrote: Or is it complaining about the lack of a primary key all together? Yes. Also, you're probably better asking DBIx::Class questions on the DBIx::Class list :) Cheers t0m ___ List:

Re: [Catalyst] Updating a database entry

2011-04-04 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thank you that solved my problem, also I will keep that in mind if I have any othr DBIx::Class questions/issues. Tomas Doran wrote: On 3 Apr 2011, at 20:25, Adam Jimerson wrote: Or is it complaining about the lack of a primary key all

Re: [Catalyst] Updating a database entry

2011-04-03 Thread Rohan M
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,

Re: [Catalyst] Updating a database entry

2011-04-03 Thread Adam Jimerson
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

Re: [Catalyst] Updating a database entry

2011-04-03 Thread Francisco Obispo
Remember that Catalyst uses DBIx::Class as an ORM, so it must be able to uniquely identified each row with a Primary Key. If you're going to update the primary key (which is not usually a good idea), make sure that you have 'ON UPDATE CASCADE' on referencing child tables, otherwise the

[Catalyst] Updating a database entry

2011-04-02 Thread Adam Jimerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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