我的產品由我的CouchDB中的用戶擁有。CouchDB-river及相關文檔
product =
name: 'Laptop'
userId: somelongid
user =
username: 'James'
的意見和include_docs = TRUE則返回:
product =
name: 'Laptop'
user =
username: 'James'
(我知道這並不完全返回上面的,但它足夠接近)
我每次我這樣做的原因需要一個產品我也需要擁有者(鏈接到他的頁面)。起初我以爲我會在_change feed上使用include_document = true,但當然還有其他的做法。
那麼在獲得產品結果時如何獲得相關用戶?