Hi all,

I just bumped into this error in the subject.
Upon further digging as per commit d748a328aec166047c81bcaf3dec6b0a885a2088, keys starting with an underscore are not accepted as valid...

DB="http://127.0.0.1:5984/mydb";
curl -X PUT $DB
curl -H "Content-Type:application/json" -d '{"docs":[{"key":"baz","_name":"bazzel"},{"key":"bar","_name":"barry"}]}' -X POST $DB/_bulk_docs

{"error":"doc_validation","reason":"Bad special document member: _name"}

Some modules I'm using as part of a project try to serialize a whole class and some of the keys are serialized with underscores.
This means that CouchDB stops being an option for storage.

Is there a good reason for this design decision ?
Couldn't the underscore keys be validated against the set of reserved words or similar ?
Could this be something not serving a useful purpose ?

Also, I couldn't find any meaningful caveat about this in the wiki ...

Regards,



                PECastro

Reply via email to