anchor.diff:  	add_resource1(Resource).
   %% @hidden
   add_resource1(#resource{} = Resource) ->
  +	TS = erlang:system_time(millisecond),
  +	N = erlang:unique_integer([positive]),
  +	Id = integer_to_list(TS) ++ integer_to_list(N),
  +	LM = {TS, N},
  +	Href = ?PathInventory ++ "resource/" ++ Id,
  +	NewResource = Resource#resource{id = Id,
  +			href = Href, last_modified = LM},
   	F = fun() ->
  -			TS = erlang:system_time(millisecond),
  -			N = erlang:unique_integer([positive]),
  -			Id = integer_to_list(TS) ++ integer_to_list(N),
  -			LM = {TS, N},
  -			Href = ?PathInventory ++ "resource/" ++ Id,
  -			NewResource = Resource#resource{id = Id,
  -					href = Href, last_modified = LM},
   			ok = mnesia:write(NewResource),
   			NewResource
   	end,
  
positive.code: 		when (is_integer(StartDate) orelse (StartDate == undefined)),
  		(is_integer(EndDate) orelse (EndDate == undefined)),
  		is_list(Characteristics), is_list(OfferId), is_list(ServiceRefs) ->
  	F = fun() ->
  			case mnesia:read(offer, OfferId, read) of
  				[#offer{char_value_use = CharValueUse} = Offer] ->
  					TS = erlang:system_time(millisecond),
  					N1 = erlang:unique_integer([positive]),
  					N2 = erlang:unique_integer([positive]),
  					LM = {TS, N2},
  					Id = ocs_rest:etag({TS, N1}),
  					F2 = fun(ServiceRef) ->
  								case mnesia:read(service, ServiceRef, write) of
  									[#service{product = undefined} = Service] ->
  
negative.code: 	add_offer1(Offer).
  %% @hidden
  add_offer1(Offer) ->
  	TS = erlang:system_time(millisecond),
  	N = erlang:unique_integer([positive]),
  	LM = {TS, N},
  	Fadd = fun() ->
  		Offer1 = Offer#offer{last_modified = LM},
  		{mnesia:write(offer, Offer1, write), Offer1}
  	end,
  	case mnesia:transaction(Fadd) of
  