On Sat, 14 Feb 2009 17:59:38 +0100 Zbigniew Lukasiak wrote: > There was a discussion at IRC about the need for -in to accept a > subquery. Like this: > > my $cdrs2 = $cdrs->search({ > artist => { > -in => $art_rs->get_column( 'artistid' )->as_query, > }, > }); > > I am attaching a simple patch to > http://dev.catalyst.perl.org/repos/bast/SQL-Abstract/1.x/branches/1.50_RC > that enables this (with one test) plus a test for DBIC (svn diff > againsthttp://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/branches/subquery).
Hi Zbigniew, thanks for spotting out this problem and for the patch. (In the general case, eg. "col => { '<' => \[$sql, @bind] }" it already worked, but the special case for '-in' was missed.) The patch was applied, with slight modifications (just to fit into the SQLA coding habits better): http://dev.catalystframework.org/svnweb/bast/revision?rev=5477 norbi _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk