anchor.diff:  get_new_unique_id(Model) when is_atom(Model) ->
   	get_new_unique_id(erlang:atom_to_binary(Model, latin1));
   get_new_unique_id(Model) when is_binary(Model) ->
  -	{ok, Ret} = ddb:get(Model, ddb:key_value(<<"metadata">>, 'string')),
  +	{ok, Ret} = ddb:get(Model, ddb:key_value(<<"__metadata">>, 'string')),
   	case proplists:get_value(<<"Item">>, Ret) of
   		undefined ->
   			init_meta_entry(Model),
   			get_new_unique_id(Model);
   		Attrs ->
  -			[{<<"N">>, CounterBin}] = proplists:get_value(<<"counter">>, Attrs),
  +			[{<<"N">>, CounterBin}] = proplists:get_value(<<"__counter">>, Attrs),
   			Counter = list_to_term(binary_to_list(CounterBin)),
   			Id = Counter + 1,
  -			ddb:update(Model, ddb:key_value(<<"metadata">>, 'string'), [{<<"counter">>, list_to_binary(io_lib:format("~p", [Id])), 'number', 'put'}]),
  +			ddb:update(Model, ddb:key_value(<<"__metadata">>, 'string'), [{<<"__counter">>, list_to_binary(io_lib:format("~p", [Id])), 'number', 'put'}]),
   			lists:flatten(io_lib:format("~p-~p", [binary_to_atom(Model, latin1), Id]))
   	end.
   
  
positive.code: 	Attrs = SavedRec:attributes(),
  	%% WEIRD: dynamodb does not allow empty strings as values, don't store them.
  	Fields = [ {atom_to_binary(K,latin1), val_to_binary(V), type_of(V)} || {K, V} <- Attrs, not_empty(V) ],
  
  	_Res = ddb:put(atom_to_binary(Model, latin1), Fields),
  
  	{ok, SavedRec}.
  
  update_existing(Record) ->
  	Model  = element(1, Record),
  
negative.code: create_from_ddbitem_list(Model, [Item | Tail]) ->
  	%% skip any metadata entries
  	case proplists:get_value(<<"id">>, Item) of
  		[{<<"S">>, <<"__metadata">>}] ->
  			create_from_ddbitem_list(Model, Tail);
  		_X ->
  			[create_from_ddbitem(Model, Item) | create_from_ddbitem_list(Model, Tail) ]
  