Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs for View.query() when include_docs=false #60

Open
srl295 opened this issue Aug 22, 2016 · 1 comment
Open

docs for View.query() when include_docs=false #60

srl295 opened this issue Aug 22, 2016 · 1 comment

Comments

@srl295
Copy link

srl295 commented Aug 22, 2016

Looking at https://github.com/lightcouch/LightCouch/blob/master/src/main/java/org/lightcouch/View.java#L162

…when include_docs=false (as in a reduce), the Class<T> classOfT is applied to the entire row {key: …, value: …}, not just the value. This probably should be documented.

Got bit by this by switching a view from reduce=false&include_docs=true to reduce=true&include_docs=false and the query no longer worked, even though the Class used should have been sufficient.

@srl295
Copy link
Author

srl295 commented Aug 22, 2016

It's probably not a good idea to make a breaking change to this function. SO the path of least resistance would be something like:

 * note: if include_docs=false, classOfT is deserialized from the entire row { key: ≈, value: ≈ }
 * — consider using queryView() instead. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant