I've got a simple table schema:

package Artist;

use base qw/DBIx::Class/;

__PACKAGE__->load_components(qw/PK::Auto Core/);
__PACKAGE__->table('artist');
__PACKAGE__->add_columns(qw/ artistid name /);
__PACKAGE__->set_primary_key('artistid');

and I'm trying to copy an old database over.
I've got duplicates that differ a bit, which I'd like to unify.

So I tried the following:

my $rs = $db->resultset('Artist');

$rs->find_or_create({
        name => {like => $oldname} });

the result is surprising: the new records end up having a HASH instead
of the old names...

I'm probably expecting too much magic from DBIx::Class...

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to