Re: couchhack
On Dec 22, 2012 3:39 PM, Robert Newson rnew...@apache.org wrote: I'm staying at the Hilton (Mohrenstr. 30) fwiw. B. Thanks! Will look at it . didn' chhose any yet. On 21 December 2012 18:48, Benoit Chesneau bchesn...@gmail.com wrote: Hi all, Has anyone already choosed its hotel for the CouchDB Conf ? Can anyone advise a place? - benoƮt [1] http://conf.couchdb.org/
Bad special document member: __VERSION__
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
Re: Bad special document member: __VERSION__
All top-level properties beginning with _ are reserved for internal uses, but you can put any named property at a deeper level. On 28 December 2012 22:38, Paulo Edgar Castro pauloedgarcas...@gmail.com wrote: 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
Re: Bad special document member: __VERSION__
Hey which couchdb version are you using?...is this 1.2? Or later?. I noticed that an underscore was used for reserved words so I just prepend some some special characters in its place to avoid that. On Dec 28, 2012 5:38 PM, Paulo Edgar Castro pauloedgarcas...@gmail.com wrote: 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
Re: Bad special document member: __VERSION__
Easier would be something like { data: your object here } though. On Dec 28, 2012 4:52 PM, Stanley Iriele siriele...@gmail.com wrote: Hey which couchdb version are you using?...is this 1.2? Or later?. I noticed that an underscore was used for reserved words so I just prepend some some special characters in its place to avoid that. On Dec 28, 2012 5:38 PM, Paulo Edgar Castro pauloedgarcas...@gmail.com wrote: 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