Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 96164 invoked from network); 3 Jun 2009 21:02:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 21:02:22 -0000 Received: (qmail 78757 invoked by uid 500); 3 Jun 2009 21:02:33 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78709 invoked by uid 500); 3 Jun 2009 21:02:33 -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 78699 invoked by uid 99); 3 Jun 2009 21:02:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 21:02:33 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 21:02:23 +0000 Received: from [10.0.1.3] (g225082208.adsl.alicedsl.de [::ffff:92.225.82.208]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Wed, 03 Jun 2009 21:02:01 +0000 Message-Id: <531A5646-9FC4-4AA9-A902-783E0EBF63D0@apache.org> From: Jan Lehnardt To: user@couchdb.apache.org In-Reply-To: <20090603190539.GA19431@uk.tiscali.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: post design documents Date: Wed, 3 Jun 2009 23:01:30 +0200 References: <20090603190539.GA19431@uk.tiscali.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On 3 Jun 2009, at 21:05, Brian Candler wrote: > On Tue, Jun 02, 2009 at 05:28:37PM +0100, Michael Stillwell wrote: >>> Do you have to DELETE the URI then re-PUT it or is there a mechanism >>> to update/version the design document? >> >> If you pass along the _rev of the *previous* version it will update >> as >> you expect. See: >> >> http://wiki.apache.org/couchdb/HTTP_Document_API >> >> "To update an existing document, you also issue a PUT request. In >> this >> case, the JSON body must contain a _rev property, which lets CouchDB >> know which revision the edits are based on." >> >> Otherwise, if retrieving _rev is awkward, you can DELETE and re-add. > > I don't think this helps, because to DELETE a document you also need > to > provide the _rev, don't you? Yup :) DELETE is just a special case of a document update, the same rules for _revs do apply. Cheers Jan --