> for a future version where couchdb's metadata is not intertwined with user data at all.
That would be a bummer. It is very convenient to just pass the doc around and use/set _id everywhere. We'd have to carry around extra metadata. On Thu, May 30, 2013 at 12:44 PM, Robert Newson <[email protected]> wrote: > It is confusing, but this is the designed behavior. _id and _rev are > used where they could conflict with user-specified properties, which > is basically whenever you're viewing a document. In other contexts, > like the JSON that CouchDB responds with to indicate success or > failure of a PUT request, it uses "id" and "rev". > > There's a ticket, COUCHDB-1725, for a future version where couchdb's > metadata is not intertwined with user data at all. With that work, > this kind of confusion can go away. > > B. > > > On 30 May 2013 20:27, Scott Weber <[email protected]> wrote: > > Hi Gang, > > > > I notice that if I do a PUT, the reply has a key named "rev" > > But if I do a GET, the key is named "_rev" > > > > (In fact, this is a case for "id" as well ) > > > > I know the key is stored in the document, and is meant to be auto > generated. > > However, why can't the "HTTP/1.1 201 Created" reply with the key "_rev", > > identical to what is in the document? > > > > The fact that there are two different key names for the same thing makes > code > > re-use and encapsulation a little more complex. > > > > Or am I missing something. > > > > -Scotty > > >
