From user-return-11319-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Jul 09 10:54:38 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 18120 invoked from network); 9 Jul 2010 10:54:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jul 2010 10:54:37 -0000 Received: (qmail 57088 invoked by uid 500); 9 Jul 2010 10:54:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 56915 invoked by uid 500); 9 Jul 2010 10:54:34 -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 56907 invoked by uid 99); 9 Jul 2010 10:54:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 10:54:33 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of herr.alexander.thomas@googlemail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 10:54:26 +0000 Received: by bwz14 with SMTP id 14so2144345bwz.11 for ; Fri, 09 Jul 2010 03:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=FCSu43KLfibmXPnQkYvIBkJYUmuSOWeyGFf1/nYqUUo=; b=mEIOLfYlvISm1u35fRghOIn6W8wv53iOUi6dyNZQHKeyN8fMsON21mDH97HufwdgiR /eBliwvcFINuO6YQEw0QzHBxS0kyGunRBn6khyn17DegsC6W22aUX0yoNn9dSuJCVw77 WzE+X4xRv/sagnDigWnXosGxsFengC5L8zW3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=LN7gtH3wPUJW0eyr3RTgOrnrNQ8lEfdOtftQU0aiACijb9IYQBEnFBluHUiUVfZYrg smniNE1dbjvEDhdIZjMzJYxCIDln/09Qa7KsI0K4fzJHlDyCAIIFRoyDSzZjkBddWHY1 NicsuN5X+CNa11RgrZd49P8eotFW1UCu7nrgI= Received: by 10.204.76.205 with SMTP id d13mr7262815bkk.93.1278672785721; Fri, 09 Jul 2010 03:53:05 -0700 (PDT) Received: from [192.168.0.11] (chello084113244019.9.14.vie.surfer.at [84.113.244.19]) by mx.google.com with ESMTPS id r10sm3256044bkh.12.2010.07.09.03.53.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Jul 2010 03:53:05 -0700 (PDT) From: Alexander Thomas Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: How can I resolve an external relation in embedded documents Date: Fri, 9 Jul 2010 12:53:03 +0200 Message-Id: To: user@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org Hello everybody, my name is Alexander Thomas. I'm a freelance web developer from Vienna, = Austria. After playing around with CouchDb a bit I finally decided to give it a = try in a first real life project. So in case my question is trivial, = don't hesitate to RTFM me and give me a (helpful) pointer. I have a document type called 'story'. A story can have multiple = sections as embedded documents, stored in an array. { "_id": "story_14c2f7f84c9701", "_rev": "4-abf15eac70a379c9a60b889c9e73357e", "type": "story", "title": "Untitled", "modified": "2010-07-03 20:27:35", "sections": [ { "text": "test 1", "author_id": id_of_author }, { "text": "test 2", "author_id": id_of_author } ] } Each section may have a different author so I store authors in different = documents to avoid duplicates. Reading the available documentation I was able to connect the story = itself to an author but what I would like to have is a view, which = collects one / all stories + the information of the author for each = embedded section. Thank you in advance. Regards, Alex=