[Dbix-class] -in or bind params broken?
Oleg Pronin
syber.rus at gmail.com
Thu Mar 15 11:57:08 GMT 2007
I use. I found no problems.
2007/3/15, Christopher H. Laco <claco at chrislaco.com>:
>
> Anyone use "-in" in SQL::Abstract/DBIC?
>
> > warn "TAGS", @tags, scalar @tags;
> > $schema->resultset('Products')->search({
> > 'tag.name' =3D> {-in =3D> \@tags}
> > }, {
> > distinct =3D> 1,
> > join =3D> [
> > {'map_product_tag' =3D> 'tag'}
> > ]
> > }
>
>
> This yields:
>
> > TAGS computerwidget2 at
> C:/Development/CPAN/Mango/script/../lib/Mango/Provider/Products.pm line 3=
5.
> > SELECT me.id, me.sku, me.name, me.description, me.price, me.created,
> me.updated FROM product me LEFT JOIN product_tag map_product_tag ON ( m
> > ap_product_tag.product_id =3D me.id ) JOIN tag tag ON ( tag.id =3D
> map_product_tag.tag_id ) WHERE ( tag.name IN ( ?, ? ) ) GROUP BY me.id,
> me.s
> > ku, me.name, me.description, me.price, me.created, me.updated:
> 'computer'
>
> Only the first tag is in the bind params to IN....
> Is this an SQL::Abstract issues, or possibly a DBIC bind params issue?
>
> -=3DChris
>
>
> _______________________________________________
> 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/dbix-class@lists.rawmode.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070315/52b=
f948e/attachment-0001.htm
More information about the Dbix-class
mailing list