anchor.diff:  
   %% @doc Returns the value of a field from a sumo_doc.
   -spec get_field(sumo:field_name(), doc()) -> sumo:field_value().
  -get_field(Name, #sumo_doc{fields=Fields}) ->
  -  proplists:get_value(Name, Fields).
  +get_field(Name, Doc) ->
  +  proplists:get_value(Name, doc_fields(Doc)).
   
   %% @doc Sets a value in an sumo_doc.
   -spec set_field(sumo:field_name(), sumo:field_value(), doc()) -> doc().
  -set_field(FieldName, Value, #sumo_doc{fields=Fields, name=Name}) ->
  +set_field(FieldName, Value, _Doc = #{fields := Fields, name := Name}) ->
     new_doc(Name, lists:keystore(FieldName, 1, Fields, {FieldName, Value})).
   
   %% @doc Returns name of field marked as ID for the given schema or doc name.
  
positive.code:   field_name(get_id_field(get_schema(DocName))).
  
  %% @doc Returns field marked as ID for the given schema or doc name.
  get_id_field(#sumo_schema{fields=Fields}) ->
    hd(lists:filter(
      fun(#sumo_field{attrs=Attributes}) ->
        length(lists:filter(fun(T) -> T =:= id end, Attributes)) > 0
      end,
      Fields
  
negative.code: %% @doc Returns the name of the schema
  -spec schema_name(schema()) -> sumo:schema_name().
  schema_name(Schema) ->
    maps:get(name, Schema, undefined).
  
  %% @doc Returns the fields of the schema
  -spec schema_fields(schema()) -> [field()].
  schema_fields(Schema) ->
    maps:get(fields, Schema, []).
  
  %% @doc Returns the doc name
  -spec doc_name(doc()) -> atom().
  doc_name(Doc) ->
    maps:get(name, Doc, undefined).
  
  -spec doc_fields(doc()) -> sumo:doc().
  doc_fields(Doc) ->
    maps:get(fields, Doc, []).
  
  %% @doc Wakes up the document
  -spec wakeup(doc()) -> sumo:user_doc().
  