module ROM::LDAP::Associations::Core

Core LDAP association API

@api private

Public Instance Methods

preload(target, loaded) click to toggle source

Used when relation association override is not true

@see github.com/rom-rb/rom/blob/master/core/lib/rom/relation.rb#L319

@api private

# File lib/rom/ldap/associations/core.rb, line 15
def preload(target, loaded)
  source_key, target_key = join_keys.flatten(1)
  target_pks = loaded.pluck(source_key.key).flatten.uniq
  target.where(target_key.key => target_pks)
end