On Tuesday, December 19, 2017 at 4:29:12 AM UTC-8, Alexander Popov wrote: > > Hello! > > I want to create a complex custom association between two tables without > foreign_keys to each other via association block (and with > `Sequel::Plugins::DatasetAssociations` using). > > But when I set [`key: nil`]( > http://sequel.jeremyevans.net/rdoc/files/doc/association_basics_rdoc.html#label-3Akey) > > — it's ignoring because of [`opts[:key] ||= opts.default_key`]( > https://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/associations.rb#L2140) > > instead something like `opts.fetch(:key, opts.default_key)`. > > Should this be changed or there are other ways to create custom > associations without keys? > > Thank you. >
You probably want to use the :dataset association option to create a custom association not based on keys. 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 https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
