Subject: | find_or_create doesn't work the same as find_or_update |
my $href = {};
$href->{scripted} = 1;
$self->schema->resultset('Vf')->update_or_create(
$href
); # this works
$href = {};
$href->{scripted} = 1;
$self->schema->resultset('VfsPermission')->find_or_create({
$href
}); # this doesn't work
Error:
Odd number of elements in anonymous hash at Vfs.pm line 856, <$fh> line 1.
DBIx::Class::ResultSet::find_or_create(): DBI Exception: DBD::mysql::st
execute failed: FUNCTION me.HASH does not exist [for Statement "SELECT
me.userid, me.path, me.privs, me.scripted, me.week FROM VFS_PERMISSIONS
me WHERE ( me.HASH(0xdec0240) IS NULL )"] at Vfs.pm line 856
DBIx::Class version 0.08127
Perl v5.8.8 built for x86_64-linux-thread-multi
Linux 2.6.18-194.17.4.el5xen #1 SMP Mon Oct 25 16:36:31 EDT 2010 x86_64
x86_64 x86_64 GNU/Linux