# class ActiveLdap::Association::HasMany

### Private Instance Methods

delete_entries(entries) click to toggle source

    # File lib/active_ldap/association/has_many.rb, line 19
    def delete_entries(entries)
      _foreign_key = foreign_key
      components = @owner[primary_key, true].reject do |value|
        value.nil?
      end
      filter = [:and,
                [:and, {_foreign_key => components}],
                [:or, {foreign_class.dn_attribute => entries.collect(&:id)}]]
      foreign_class.update_all({_foreign_key => []}, filter)
    end

find_target() click to toggle source

    # File lib/active_ldap/association/has_many.rb, line 15
    def find_target
      collect_targets(primary_key)
    end

insert_entry(entry) click to toggle source

    # File lib/active_ldap/association/has_many.rb, line 10
    def insert_entry(entry)
      entry[foreign_key] = @owner[primary_key]
      entry.save
    end