It seems like the dataset_associations_join: true option addresses this to some extend, but it combines the dataset with the "ds" from the previous case statement which then causes the error.
Was the https://github.com/jeremyevans/sequel/blob/master/lib/sequel/plugins/dataset_associations.rb#L128 intended to create a whole new dataset or to build off the previous one created here: https://github.com/jeremyevans/sequel/blob/master/lib/sequel/plugins/dataset_associations.rb#L84 On Thursday, July 27, 2017 at 1:46:08 PM UTC-7, Aryk Grosz wrote: > > If I have a many_through_many that reuses the same table, it will change > the qualifier for the second table when called from an instance, but when > used with dataset_associations, it will not, leading to "Not unique > table/alias:". > > Looking at the plugin, seems like the problem could be here: > > > https://github.com/jeremyevans/sequel/blob/master/lib/sequel/plugins/dataset_associations.rb#L111 > > Shouldn't the e[:table] be aliased if it gets called a second time? > > > -- 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.
