class ActiveLdap::Association::BelongsToMany

def insert_entry(entry)

def insert_entry(entry)
  old_value = entry[@options[:many], true]
  primary_key_name = @options[:primary_key_name]
  if primary_key_name == "dn"
    old_value = dn_values_to_string_values(old_value)
  end
  current_value = @owner[primary_key_name, true]
  current_value = dn_values_to_string_values(current_value)
  new_value = old_value + current_value
  new_value = new_value.uniq.sort
  if old_value != new_value
    entry[@options[:many]] = new_value
    entry.save
  end
end