I have a very similar example to this:

https://groups.google.com/d/msg/sequel-talk/muJ14cXsnpA/YK1eV65-5qYJ

You propose to solve it with this:

Artist.many_to_many :songs, :join_table=>:albums, :right_key=>:id, 
:right_primary_key=>:album_id


This works for the normal usages like

artist.songs

However, if you do

artist.song_pks, it will not return the correct values. I believe it tries 
to get the values off the intermediary table (like as if it were a real 
join table, which it isn't) and that's what is causing the issues since it 
actually needs to join over to the songs table via the album_id field and 
then look up the primary keys on that table.

Or maybe I'm missing something?
 

-- 
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