I am using the Riak map
data type to store user information in a users
bucket. When testing this with a simple curl
call, I noticed that it was necessary to append _register
to every property name in order for the curl
request to be accepted.
For example, this fails:
curl -XPOST http://127.0.0.1:10018/types/user/buckets/users/datatypes/jsmith \
-H "Content-Type: application/json" \
-d '{"update":{"first-name":"John","last-name":"Smith"}}'
Invalid map field name 'first-name'
But this works:
curl -XPOST http://127.0.0.1:10018/types/user/buckets/users/datatypes/jsmith \
-H "Content-Type: application/json" \
-d '{"update":{"first-name_register":"John","last-name_register":"Smith"}}'
Do I really need to append _<type-name>
to every single property?