class ActiveRecord::Associations::Preloader::Association

def set_inverse(record)

def set_inverse(record)
  if owners = owners_by_key[derive_key(record, association_key_name)]
    # Processing only the first owner
    # because the record is modified but not an owner
    association = owners.first.association(reflection.name)
    association.set_inverse_instance(record)
  end
end