Class/Module Index [+]

Quicksearch

Sequel::Plugins::ManyToOnePkLookup::ClassMethods

Public Instance Methods

def_many_to_one(opts) click to toggle source

Disable primary key lookup in cases where it will result in a different query than the association query.

# File lib/sequel/plugins/many_to_one_pk_lookup.rb, line 26
def def_many_to_one(opts)
  if !opts.has_key?(:many_to_one_pk_lookup) &&
     (opts[:dataset] || opts[:conditions] || opts[:block] || opts[:select] ||
      (opts.has_key?(:key) && opts[:key] == nil))
    opts[:many_to_one_pk_lookup] = false
  end
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.