Allan Cochrane wrote:
On Thu, Dec 15, 2011 at 5:22 PM, Drew Taylor <[email protected] <mailto:[email protected]>> wrote:I think https://metacpan.org/module/DBIx::Class::Manual::Cookbook#Subqueries will be helpful to you. Drew Hi,thanks, the link you gave me doesn't show the generated SQL so it's hard to tell if it does what I want! :-) I find no examples in the documentation of using a subquery in the 'from' attribute. There is an example of that usage in the tests, which is what I ended up referring to and I managed to get the SQL to look something like SELECT ... FROM (SELECT ..) JOIN ... ON xxx but I still cannot see how to make more than one join condition for xxx. The package test code assumes a relationship between two tables, which is not the case here ...
This is correct, DBIC currently has no facility to express arbitrary joins between arbitrary chunks of SQL. What are you actually trying to achieve here? Is there a reason you are not running said query against the handle directly with $schema->dbh_do ? Cheers _______________________________________________ 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/[email protected]
