Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 56973 invoked from network); 13 May 2008 22:04:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 May 2008 22:04:49 -0000 Received: (qmail 96189 invoked by uid 500); 13 May 2008 22:04:50 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 96157 invoked by uid 500); 13 May 2008 22:04:50 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 96146 invoked by uid 99); 13 May 2008 22:04:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 15:04:50 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.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; Tue, 13 May 2008 22:04:01 +0000 Received: from [10.0.2.3] (e179132099.adsl.alicedsl.de [::ffff:85.179.132.99]) (AUTH: LOGIN jan, SSL: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Tue, 13 May 2008 22:04:15 +0000 Message-Id: <5BC50A6D-FB6F-4F48-ABEE-B3904C51F5C4@apache.org> From: Jan Lehnardt To: couchdb-user@incubator.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 v919.2) Subject: Re: mapping on a key that doesn't exist Date: Wed, 14 May 2008 00:04:13 +0200 References: X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On May 13, 2008, at 23:19, Bob Briski wrote: > I've found that I can't create a view with a key that includes a > document key that doesn't exist in all documents. > > I confused myself with that opening statement so here's an example > of what I'm talking about: > http://pastie.caboo.se/196397 try http://pastie.caboo.se/196428 Hans Dieter is correct in his assessment that the js process bails out when trying to use an undefined value. (where as undefined !== null in javascript. > I understand if this is the way it's supposed to work. I also > understand that I can use an if statement to check if the key exists > in the document. However, that means that if I change the schema of > future documents and I've written a previous view that doesn't check > for all of it's keys, those previous views cease to function. > > I thought that a large advantage of document databases is the > ability to change the schema of your documents and not cause > problems. Is this not the case, or am I thinking of this incorrectly? > > Thanks, > Bob