anchor.diff:      Type = element(1, Record),
       Bucket = list_to_binary(type_to_bucket_name(Type)),
       PropList = [{riak_search_encode_key(K), riak_search_encode_value(V)} || {K, V} <- Record:attributes(), K =/= id],
  -    Key = case Record:id() of
  -        id ->
  -            % TODO: The next release of Riak will support server-side ID
  -            %       generating. Get rid of unique_id_62/0.
  -            unique_id_62();
  -        DefinedId when is_list(DefinedId) ->
  +    RiakKey = case Record:id() of
  +        id -> % New entry
  +            O = riakc_obj:new(Bucket, undefined, PropList),
  +            {ok, RO} = riakc_pb_socket:put(Conn, O),
  +            binary_to_list(element(3, RO));
  +        DefinedId when is_list(DefinedId) -> % Existing Entry
               [_ | Tail] = string:tokens(DefinedId, "-"),
  -            string:join(Tail, "-")
  +            Key = string:join(Tail, "-"),
  +            BinKey = list_to_binary(Key),
  +            {ok, O} = riakc_pb_socket:get(Conn, Bucket, BinKey),
  +            O2 = riakc_obj:update_value(O, PropList),
  +            ok = riakc_pb_socket:put(Conn, O2),
  +            Key
       end,
  -    BinKey = list_to_binary(Key),
  -    ok = case riakc_pb_socket:get(Conn, Bucket, BinKey) of
  -        {ok, O} ->
  -            O2 = riakc_obj:update_value(O, PropList),
  -            riakc_pb_socket:put(Conn, O2);
  -        {error, _} ->
  -            O = riakc_obj:new(Bucket, BinKey, PropList, <<"application/x-erlang-term">>),
  -            riakc_pb_socket:put(Conn, O)
  -    end,
  -    {ok, Record:set(id, lists:concat([Type, "-", Key]))}.
  +    {ok, Record:set(id, lists:concat([Type, "-", RiakKey]))}.
   
   % These 2 functions are not part of the behaviour but are required for
   % tests to pass
  
positive.code: 
  -define(HUGE_INT, 1000 * 1000 * 1000 * 1000).
  
  start(_Options) ->
      % TODO: crypto is needed for unique_id_62/0. Remove it when
      %       unique_id_62/0 is not needed.
      crypto:start().
  
  stop() ->
      ok.
  
negative.code:     type_to_bucket_name(atom_to_list(Type));
  type_to_bucket_name(Type) when is_list(Type) ->
      inflector:pluralize(Type).
  
  build_search_query(Conditions) ->
      Terms = build_search_query(Conditions, []),
  