Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 68930
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: nbezzala [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08127
Fixed in: (no value)



Subject: find_or_create doesn't work the same as find_or_update
Download (untitled) / with headers
text/plain 833b
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
Download (untitled) / with headers
text/plain 111b
You passed the hashref in a hashref to find_or_create. Please report if passing it directly fixes your problem.
Subject: Re: [rt.cpan.org #68930] find_or_create doesn't work the same as find_or_update
Date: Sun, 19 Jun 2011 05:44:41 -0700 (PDT)
To: bug-DBIx-Class [...] rt.cpan.org
From: Nitish Bezzala <nbezzala [...] yahoo.com>
Download (untitled) / with headers
text/plain 518b
Yes, it does. Sorry. I tried to cancel the ticket but didn't find a way to do it. Regards, Nitish Show quoted text
________________________________ From: Alexander Hartmaier via RT <bug-DBIx-Class@rt.cpan.org> To: nbezzala@yahoo.com Sent: Sun, June 19, 2011 2:35:50 PM Subject: [rt.cpan.org #68930] find_or_create doesn't work the same as find_or_update <URL: https://rt.cpan.org/Ticket/Display.html?id=68930 > You passed the hashref in a hashref to find_or_create. Please report if passing it directly fixes your problem.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.