From user-return-2392-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Dec 28 14:51:07 2008 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 4385 invoked from network); 28 Dec 2008 14:51:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Dec 2008 14:51:07 -0000 Received: (qmail 9699 invoked by uid 500); 28 Dec 2008 14:51:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9660 invoked by uid 500); 28 Dec 2008 14:51:06 -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 9649 invoked by uid 99); 28 Dec 2008 14:51:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Dec 2008 06:51:06 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.86.168.178 is neither permitted nor denied by domain of geir@pobox.com) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Dec 2008 14:50:55 +0000 Received: from [10.0.1.194] (unknown [67.86.14.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 3A42223E3F3 for ; Sun, 28 Dec 2008 09:50:32 -0500 (EST) Message-Id: <60C9F0D4-9C91-4F50-B8CE-278C390533B0@pobox.com> From: "Geir Magnusson Jr." To: user@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: newbie question #1 Date: Sun, 28 Dec 2008 09:50:32 -0500 References: <98979283-BB61-4D15-AF05-196979FA42BC@pobox.com> <20081228131927.GO21261@tumbolia.org> <13A776CD-4E7F-48D4-A204-B6FECE50F291@pobox.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org On Dec 28, 2008, at 9:36 AM, Damien Katz wrote: > > On Dec 28, 2008, at 8:58 AM, Geir Magnusson Jr. wrote: > >> >> The following two documents are legal JSON documents, but CouchDB >> can't store them (if I grok CouchDB right) : >> >> { >> "_id" : "geir's document", >> "foo" : "bar" >> } >> >> { >> "_id" : "geir's document", >> "foo" : "woogie" >> } > > Sure you can: > > {_id:"the actual id", > body:{ > "_id" : "geir's document", > "foo" : "bar" > } > } > > > If you need to store underscore fields, store move the whole > document down from the top level into another field. I understand that, but that's really my point - I need to change my document if I want to store it in CouchDB. People don't seem to care though :) > > This doesn't just apply to _id and _rev, there are other meta fields > that can be returned in a doc, and those will also have underscores. > The rule is reserved fields in document root start with underscore. > User fields at the doc root level cannot start with underscore. Yep - that was clear in the docs. geir