update objects in precommit hooks

2011-04-01 Thread Damian Dobroczyński
Hi, list! I'm trying to update object metadata dictionary within my precommit hook (in Erlang) using `riak_object:update_metadata/2' like this: Old = riak_object:get_metadata(O), New = dict:store(<<"X-my-metadata-name">>, Value, Old), NewObject = riak_object:update_metadata(O, New), Unfort

Re: update objects in precommit hooks

2011-04-01 Thread Damian Dobroczyński
gt; Basho Technologies. > Well, I have not applied this patch yet, but in meanwhile I looked into the riak_object source code and found apply_updates/1. I simply called this one as the last step in my hook function and it worked. Probably this is not the correct way of solving this problem, is

Multiple representations of an object with GET

2011-04-08 Thread Damian Dobroczyński
Hi list! I do not want to dig deep in the Riak source code now, so I'm sking this question here. These are my needs: - objects are stored as Erlang terms (say as gb_tree or proplists) - GET with "accept" header set to "application/json" returns JSON - GET with "accept" header set to "application