[Catalyst] update record with unique ID

Michael Higgins mhiggins at banfieldgroup.com
Mon Apr 9 20:37:53 GMT 2007


Hello, Cat-list-ers,

Here's a pared-down version of my question, hoping it's an easy one:

ERROR:
"DBIx::Class::ResultSet::update(): Error executing 'UPDATE ...
Duplicate entry '140949' for key 1 at 

QUESTION:
How do we specify UPDATE ... blah WHERE (ID='UNIQUE')

CODE:
    my $result = [$c->model('WhateverDB::Whatever')->update({id => $id},{
this=>that,
another=>something,
        });]

How to update with the unique column... or do I just have to delete the old
record and insert a new one from scratch?

TIA,

-- 
Michael Higgins





More information about the Catalyst mailing list