2

I need to write an design doc that checks whether or not an ID exists on a product in an other database (same CouchDB instance) before allowing the addition of a document to the database.

This should go along the lines of the following:

Actor -> Requests to store a document in the database. 
System -> Checks if a document exists in an other database so it can validate the input from the request. 
System -> Adds the document if validation succeeds or refuses the document if validation fails.

My question is. Is it possible to validate against the content of an other database? I have not been able to find anything about accessing the documents in an other database from within a design document (update handler) so far.

SomeDutchGuy
  • 2,249
  • 4
  • 16
  • 42

0 Answers0