[Dbix-class] SQL::Abstract 1.x subqueries patch

Dami Laurent (PJ) laurent.dami at justice.ge.ch
Wed Nov 5 16:20:45 GMT 2008


 

>-----Message d'origine-----
>De : Zbigniew Lukasiak [mailto:zzbbyy at gmail.com] 
>Envoyé : mercredi, 5. novembre 2008 14:58
>À : DBIx::Class user and developer list
>Objet : Re: [Dbix-class] SQL::Abstract 1.x subqueries patch
>
>I've started testing it with the latest DBIC.
>
>Here is a test I propose:
>
>Index: t/02where.t
>===================================================================
>--- t/02where.t (wersja 5054)
>+++ t/02where.t (kopia robocza)
>@@ -175,6 +175,18 @@
>         stmt => " WHERE ( (bar > ? AND bar < ?) AND foo IN (?, ?) )",
>         bind => [44, 55, 22, 33],
>     },
>+    {
>+        where => {
>+                       '-and' => [
>+                                   {},
>+                                   {
>+                                     'me.id' => '1'
>+                                   }
>+                                 ]
>+        },
>+        stmt => " WHERE ( ( me.id = ? ) )",
>+        bind => [ 1 ],
>+    },
>
> );
>
>Currently this is translated into "WHERE ( 0 AND ( me.id = ? ) )" and
>that causes t/relationship_doesnt_exist.t in DBIC fail.  I've tested
>that the 1.24 does ignore that spurious clause (it is added in the
>'single' method in ResultSet).
>

Hi,

Thanks for the bug report; fixed in revision 5055 (with your test added).

Cheers, Laurent Dami



More information about the DBIx-Class mailing list