class ActiveLdap::Association::HasManyWrap

def insert_entry(entry)

def insert_entry(entry)
  old_value = @owner[@options[:wrap], true]
  _foreign_key = foreign_key
  if _foreign_key == "dn"
    old_value = dn_values_to_string_values(old_value)
  end
  current_value = entry[_foreign_key, true]
  current_value = dn_values_to_string_values(current_value)
  new_value = (old_value + current_value).uniq.sort
  if old_value != new_value
    @owner[@options[:wrap]] = new_value
    @owner.save unless @owner.new_entry?
  end
end