I need to create a collate view with couch db but I dont want to use the current records, I want to use records of a specific revision. For example, lets imagine that I have an invoice with an array of products ids (and theirs revision), I want to return the products with the description and prices as was at the invoice creation.

1 Answer 1


Normally you should never do so because other revisions may be deleted after compacting the database. You should include all necessary fields to recompose(reprint) the invoice in the invoice document, like: product description, product price, total, and so on.

This is the same if you would store invoices in a rdbms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.