couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macario <>
Subject Deleting a buch of documents with a single request without knowing the ids?
Date Wed, 20 May 2009 08:13:05 GMT

I am working on a Ruby client and I'm trying to do many to many
relationships between documents with a joint document establishing the
relationship between them, my problem is updating the joint documents.

The joint document contains the id for both documents so when I first save
the related documents I allso save the joint doc for each relationship by
now the id is generated by CouchDB.

If I want to update the relationships I would first need to generate a view
for getting the ids for the relationships between the docs and then bulk
delete them while updating the attributes for related docs and that makes a
GET request and a POST request. So the question is can I delete all
relationship documents that match certain conditions without knowing the ids
prior to posting the new ones? Sort of like using a view. It would still
make two requests but I wouldn't care about the first response. What other
alternatives people has come up with for many to many relationships apart
from the listed on the wiki?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message