On 01/26/2018 10:12 PM, Diab Jerius wrote:


I somehow marked your email is read without having read it D:

But now I'm stuck.  How do I perform a join with the second subquery?

Currently you can not do this with DBIC-level APIs alone. There is no quick fix for this. But that's ok because at any point you can feed arbitrary SQL to the chaining structure.

You will have to do some surgery to assemble the query you want, by extracting it from $rs1->as_query / $rs2->as_query, and mangling the first value of the returned structure.

Then once you have the \[ $sql, @binds ] that you want to see you'd simply feed them to:

->search( {}, { from => \[...], <rest of attrs> } );

Hope this helps!

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

Reply via email to