On Dec 3, 2013, at 11:23 AM, Benoit Chesneau <bchesn...@gmail.com> wrote:
> On Tue, Dec 3, 2013 at 8:20 PM, Alexander Shorin <kxe...@gmail.com> wrote: > >> Sorry, miss the smile, but in every joke there is only a piece of joke (; >> Anyway there will be collisions since it's old issue about split >> predefined and custom resources in RESTful apps and prefix is quite >> common way to solve it with less blood. >> -- >> ,,,^..^,,, >> >> > but what about prefixing all data in _data? Except if we want to store > unstructured data in the doc it would work imo. Relevant to the OP, simply putting document contents with arbitrary fields underneath one level e.g. "_id,_rev,data: {…}" should be safe in current versions of CouchDB, the old wiki at least seemed to be clear that only in "any top-level fields" are underscore-prefixed fields reserved: http://wiki.apache.org/couchdb/HTTP_Document_API#Special_Fields So if one wants to store truly arbitrary JSON and/or more cleanly separate meta from data they could [at least according to the wiki] already do so without caveat today in 1.x. I've filed https://issues.apache.org/jira/browse/COUCHDB-1952 requesting clarification (preferably simply a reiteration) of this in the official documentation. hth, -nvw