I have a product which is owned by a user in my CouchDB.
product =
name: 'Laptop'
user =
username: 'James'
With views and include_docs=true it returns:
product =
name: 'Laptop'
user =
username: 'James'
( I know it doesn't exactly return the above but it's close enough )
I do this cause every time I need a product I also need the owner (to link
to his page). At first I thought I would just use include_document=true on
the _change feed but of course that does something else.
So how can I get the related user when getting product results?
I have a product which is owned by a user in my CouchDB.
product =
name: 'Laptop'
user =
username: 'James'
With views and include_docs=true it returns:
product =
name: 'Laptop'
user =
username: 'James'
( I know it doesn't exactly return the above but it's close enough )
I do this cause every time I need a product I also need the owner (to link to his page). At first I thought I would just use include_document=true on the _change feed but of course that does something else.
So how can I get the related user when getting product results?
Thanks David, that looks like it might work. I don't have a Java
environment to compile it so I guess I have to wait a little. For now I am
solving it by doing an extra query to couchDb.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.