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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 833
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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18811-1308474347-453.68930-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 111
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.
From nbezzala [...] yahoo.com Sun Jun 19 08: 44:51 2011
X-Ymail-Osg: 9tc6ZxsVM1mjNxDacVUcOqKbIKh87SXPo9ilWVBSUMYqAPn zRnlEVtaLVPfeIQsaLKHa2skmBEqad6KRnViu..26Rs2SKbcExlQZPnIp8qJ RzpnJ0DdL4hirPiSBA.26resXph7ZB7Iw2pQ_Zip1.pf.LWvLZ0n.IcQw1dq DlpgvRPd2HB6gGpnIhL85sEBVDd9PZitNzpTDQvxiVBLR2sTh0RPOcI9jma. HviUnOsxSI0KRoqF5BncPiih38jSGNo1CZF2_0hf3AVqFprvZLdqjhSIvWqO Z6B6Np95G_8j.Ml1tzMr.L4GS_L6uQNk..WViLXuBApXJkDL3x2LNcEUq9tY F.83nGEhx54OdujEBLt9LKoczqnoRQx2OkWbI_U9M4GzYbdYqwFy3Z5TX1OX DuX57SDy_XgcymgS1bn2Ast5ZnHzxWVVsCDbVZppQT6OgKK.PCr0s1lDtkYb _RzsgfcY-
MIME-Version: 1.0
X-Spam-Status: No, score=-6.987 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-18811-1308474349-1263.68930-6-0 [...] rt.cpan.org>
X-Mailer: YahooMailRC/570 YahooMailWebService/0.8.111.304355
X-Spam-Flag: NO
X-Yahoo-Newman-ID: 812601.30390.bm [...] omp1042.mail.sp2.yahoo.com
References: <RT-Ticket-68930 [...] rt.cpan.org> <rt-3.8.HEAD-18811-1308474349-1263.68930-6-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Yahoo-Newman-Property: ymail-3
Message-ID: <30203.85359.qm [...] web114014.mail.gq1.yahoo.com>
Content-Type: multipart/alternative; boundary="0-1576097597-1308487481=:85359"
X-Spam-Score: -6.987
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] yahoo.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=nbezzala [...] yahoo.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 2D26C24027C for <cpan-bug+dbix-class [...] hipster.bestpractical.com>; Sun, 19 Jun 2011 08:44:51 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id orHKFO9SSD7F for <cpan-bug+dbix-class [...] hipster.bestpractical.com>; Sun, 19 Jun 2011 08:44:49 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 8748A2401FB for <bug-dbix-class [...] rt.cpan.org>; Sun, 19 Jun 2011 08:44:49 -0400 (EDT)
Received: (qmail 14119 invoked by uid 103); 19 Jun 2011 12:44:48 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Jun 2011 12:44:48 -0000
Received: from nm24.bullet.mail.sp2.yahoo.com (HELO nm24.bullet.mail.sp2.yahoo.com) (98.139.91.94) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with SMTP; Sun, 19 Jun 2011 05:44:46 -0700
Received: from [98.139.91.61] by nm24.bullet.mail.sp2.yahoo.com with NNFMP; 19 Jun 2011 12:44:43 -0000
Received: from [98.139.91.42] by tm1.bullet.mail.sp2.yahoo.com with NNFMP; 19 Jun 2011 12:44:43 -0000
Received: from [127.0.0.1] by omp1042.mail.sp2.yahoo.com with NNFMP; 19 Jun 2011 12:44:43 -0000
Received: (qmail 2399 invoked by uid 60001); 19 Jun 2011 12:44:42 -0000
Received: from [1.23.196.35] by web114014.mail.gq1.yahoo.com via HTTP; Sun, 19 Jun 2011 05:44:41 PDT
Delivered-To: cpan-bug+dbix-class [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #68930] find_or_create doesn't work the same as find_or_update
Return-Path: <nbezzala [...] yahoo.com>
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=kH0h1FuCbGXWr2Pktmsk3Zrns0Bil6kU738fJ1na+Ksp75Z0Y7x6t9ocZUe7SwaWPuISl0fyn5Iokun2DskVW8xTxWWjuZEOIqkbJZxkLQxHHzG/i9SiMCqrz59ppxW7b4k7483oPc9zl3xec2x1RV1JLXIJX91ENuIk5Xm1Hls=;
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1308487482; bh=QEtXq4Ijn0pUGt7ONPKfHDViP+H+aLl2BTfyh7vI+ho=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=bQHIuBEFv9uiXIZGRliYu8h0ay1Gs24huMQKerrXMJ/i95RiRTRj0CFCgb0lwwA51aN10Scv7VJotp/bPPkzSvKaMFUDp2HhZDRK5xP/pj+KAk/MIHGAhiPpeAYXtYndCg3D/KX5kIve6rvHJHIAb7IF6gT5hWz75AX8VaSgjb0=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+dbix-class [...] hipster.bestpractical.com
X-RT-Mail-Extension: dbix-class
Date: Sun, 19 Jun 2011 05:44:41 -0700 (PDT)
X-Spam-Level:
To: bug-DBIx-Class [...] rt.cpan.org
From: Nitish Bezzala <nbezzala [...] yahoo.com>
RT-Message-ID: <rt-3.8.HEAD-18805-1308487491-321.68930-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 518
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.
Content-Type: text/html; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 1217


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.