On Tuesday, May 6, 2014 9:32:27 AM UTC-7, Johannes Held wrote: > > Jeremy, thanks for your quick answer. Much obliged. > > Reading the documentation for the first time, I ran into another small > hiccup. > It wasn't clear to me, that the first parameter to ›many_through_many‹ is > used to infer the ‘last’ join. >
All of the examples show that you don't need to. I suppose it wouldn't hurt to make that more explicit, so I'll commit another patch for that. I used a table named :beamcount_eqlass and had to use many_through_many > :beamcount_eqlass*es*. > Yes, like all associations returning multiple objects, you need to use the plural form. This is explained elsewhere in the associations documentation. > And furthermore it's possible to use a complete different name and pass a > :class parameter > > class Artist < Sequel::Model > many_to_many :albums > many_through_many *:schlagworte*, [[:albums_artists, :artist_id, > :album_id], > [:albums_tags, :album_id, :tag_id]], > :distinct => true, *:class => :Tag* > end > Use of the :class option is documented in the association guides. I don't think it makes sense to redocument every association option in the plugin documentation. The plugin documentation should only mention the differences and additional features compared to the standard association behavior. Thanks, Jeremy -- 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 http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
