Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32AE3FA4E for ; Fri, 31 May 2013 18:01:46 +0000 (UTC) Received: (qmail 30189 invoked by uid 500); 31 May 2013 18:01:44 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 30158 invoked by uid 500); 31 May 2013 18:01:44 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30146 invoked by uid 99); 31 May 2013 18:01:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 May 2013 18:01:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.128.172 as permitted sender) Received: from [209.85.128.172] (HELO mail-ve0-f172.google.com) (209.85.128.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 May 2013 18:01:39 +0000 Received: by mail-ve0-f172.google.com with SMTP id jz10so1373872veb.17 for ; Fri, 31 May 2013 11:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=moZdMW5ozOPL0KqFpw6JypVH2dp0RIN/034SZLfz7y8=; b=fiish99P5b0pBlGhw5IWeI0x2QWBjiBvse4bCpm4+qNL930KZMj0SmIqfF1RkhlYtJ uznZ0X2bZECb22WfjeYTGQrgZL3UdOZmqAeYKCSwKnNPDHp4PmWi9mGwXBqqNjTR8bx9 ZF9GoVdBNg7GY/EvXg4nIbhJYjNXlTRsFaqESfpoYCpeElBEtw7iQv1AvrprXxYvvwWE z95mwd2NiJYuPUIuPdfhEFV/74GQ/J/izECtfCgVA7TKiD7wHbwhE8pbqCPky09BT11d ET4webMJzoxoc3XnM+sHbzT/XwxVtU6CamxKmfbFzx+kxN9AKGUzW1mnlVdkypFO8xrr tHsg== X-Received: by 10.52.157.138 with SMTP id wm10mr9612250vdb.57.1370023278267; Fri, 31 May 2013 11:01:18 -0700 (PDT) Received: from [172.16.9.233] (50-195-18-145-static.hfc.comcastbusiness.net. [50.195.18.145]) by mx.google.com with ESMTPSA id nr3sm36130236veb.4.2013.05.31.11.01.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 11:01:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: _rev or rev...? Did I see that right? From: Adam Kocoloski In-Reply-To: <1369947621.58634.YahooMailRC@web181703.mail.ne1.yahoo.com> Date: Fri, 31 May 2013 14:01:15 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <3576BC73-E2DF-4D25-B9E9-78358F174502@apache.org> References: <1369942020.94745.YahooMailRC@web181704.mail.ne1.yahoo.com> <1369947621.58634.YahooMailRC@web181703.mail.ne1.yahoo.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1503) X-Virus-Checked: Checked by ClamAV on apache.org It's a wart for sure. I still get it wrong from time to time. Adam On May 30, 2013, at 5:00 PM, Scott Weber = wrote: > I concur with Mark that it would be a bummer. >=20 > I understand the desire to remove potential conflicts of 'id' and = 'rev', which=20 > is probably why they were 'name mangled' in C-style. >=20 > But if the PUT request used the same name mangling, the meta data = would be=20 > consistently obtained. >=20 > Every language has reserved words. Every developer/user needs to live = with it.=20 > I'd just prefer that they were the same. >=20 > -Scotty >=20 >=20 >=20 >=20 > ----- Original Message ---- > From: Mark Hahn > To: user@couchdb.apache.org > Sent: Thu, May 30, 2013 3:01:47 PM > Subject: Re: _rev or rev...? Did I see that right? >=20 >> for a future version where couchdb's metadata is not intertwined with > user data at all. >=20 > 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. >=20 > On Thu, May 30, 2013 at 12:44 PM, Robert Newson = wrote: >=20 >> 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". >>=20 >> 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. >>=20 >> B. >>=20 >>=20 >> On 30 May 2013 20:27, Scott Weber wrote: >>> Hi Gang, >>>=20 >>> 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" >>>=20 >>> (In fact, this is a case for "id" as well ) >>>=20 >>> 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? >>>=20 >>> The fact that there are two different key names for the same thing = makes >> code >>> re-use and encapsulation a little more complex. >>>=20 >>> Or am I missing something. >>>=20 >>> -Scotty >>>=20 >>=20 >=20