Hello Jeremy,

I'm trying to figure out how can I do a cascading association join, so that 
for

  class Artist < Sequel::Model
  end

  class Album < Sequel::Model
    many_to_one :artist
  end

  class Song < Sequel::Model
    many_to_one :album
  end

I generate the equivalent query to:

  Song
    .join(:albums, Sequel[:albums][:id] => Sequel[:songs][:album_id])
    .join(:artists, Sequel[:artists][:id] => Sequel[:albums][:artist_id])

But using #association_join instead of #join to avoid having to repeat JOIN 
arguments that are already defined by the associations.

Kind regards,
Janko

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to