couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "EntityRelationship" by Michael Carrato
Date Sat, 03 Apr 2010 02:15:01 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "EntityRelationship" page has been changed by Michael Carrato.
The comment on this change is: fix another mismatch in doc.type comparison ('relationship'
-> 'relation').
http://wiki.apache.org/couchdb/EntityRelationship?action=diff&rev1=18&rev2=19

--------------------------------------------------

  To know what groups a contact belongs to you can use
  {{{
  "map":function(doc) {
-    if (doc.type == 'relationship') {
+    if (doc.type == 'relation') {
        emit([doc.contact_id,1],doc.group_id);
     } else if (doc.type == 'contact') {
        emit([doc._id,0],doc);

Mime
View raw message