On Jul 6, 8:56 pm, Phrogz <[email protected]> wrote: > irb(main):003:0> DB.dataset.from( ids ).left_outer_join( DB > [:objects].as(:objects), :id=>:o_id ).left_outer_join( DB[:methods].as > (:methods), :id=>:m_id ).sql > => "SELECT * FROM (SELECT 1 AS o_id, 2 AS m_id) AS 'ids' LEFT OUTER > JOIN (SELECT * FROM objects) AS 'objects' ON (objects.id = ids.o_id) > LEFT OUTER JOIN (SELECT * FROM methods) AS 'methods' ON (methods.id = > objects.m_id)"
Of course, that should have been the far simpler: DB.dataset.from( ids ) .left_outer_join( :objects, :id=>:o_id ) .left_outer_join( :methods, :id=>:m_id ) .sql --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
