On Feb 24, 10:11 am, cult hero <[email protected]> wrote: > I feel like I have read this somewhere before. I could have sworn it > was in Sequel docs, but I just reread the associations section and > either missed it or it isn't there. > > Let's say I have the tables teams and players and they are associated > on a many_to_many basis. However, in the join table I want to have the > date they joined the team as well. > > Do I have to create a model for the join to get at the information > through an association? How does that work?
Team.many_to_many :players, :select=>[:players.*, :players_teams__join_date] It's documented in http://sequel.rubyforge.org/rdoc/files/doc/association_basics_rdoc.html Jeremy -- 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.
