anchor.diff:  search_reply(_From, SearchResult,_MessageID) when is_atom(SearchResult) ->
       SearchResult;
   search_reply(From, [Item|Result], MessageID) ->
  -    Attrs = lists:flatten(lists:map(fun(I) -> item_to_attribute(I) end, Item)),
  +    Attrs = lists:flatten(lists:map(fun(I) -> ldap_obj:to_attr(I) end, Item)),
       {value, {_, "dn", [DN]}, PartialAttrs} = lists:keytake("dn", 2, Attrs),
       Entry = {'SearchResultEntry', DN, PartialAttrs},
       ldap_fsm:reply(From, {{searchResEntry, Entry}, MessageID}),
  
positive.code:     case emongo:find_one(eds, ?COLL, [{"_rdn", rdn(DN)}]) of
  	[_Entry] -> entryAlreadyExists;
  	[] ->
  	    Entry = lists:map(fun(A) -> attribute_to_item(A) end, Attrs),
  	    AddDN = ldap_obj:insert(<<"dn">>, DN, Entry),
  	    NewEntry = ldap_obj:insert(<<"_rdn">>, rdn(DN), AddDN),	    
  	    Response = emongo:insert_sync(eds, ?COLL, NewEntry),
  
negative.code: 
  %% @doc Apply ModifyRequest change atoms to an object
  modify_apply({'ModifyRequest_changes_SEQOF', add, Change}, Entry) ->
      {Key, Value} = ldap_obj:to_record(Change),
      ldap_obj:insert(Key, Value, Entry);
  modify_apply({'ModifyRequest_changes_SEQOF', replace, Change}, Entry) ->
      {Key, Value} = ldap_obj:to_record(Change),
      ldap_obj:modify(Key, Value, Entry);
  modify_apply({'ModifyRequest_changes_SEQOF', delete, Change}, Entry) ->
      {Key,_Value} = ldap_obj:to_record(Change),
      ldap_obj:delete(Key, Entry).
  
  %% @doc Parse eMongo response code
  