Open srl295 opened 8 years ago
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.
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), theClass<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
toreduce=true&include_docs=false
and the query no longer worked, even though the Class used should have been sufficient.