ublicwith
List<User> users = client.view("user-fn/by-group").key(group).query(User.class);
where client is a couchdb client,
user-fn is the design document,
by-group is the view,
...
"by-group": {
"map": "function(doc) {\n if (doc.group) {\n emit(doc.group, doc);\n }\n}\n"
...
I get the correct number of user objects in the list, but all user fields are null.
Must the user pojo be in bean pattern (with getters and setters), or can it have just public fields?
I think the issue is a missing param,
include_docsshould be set to true.According to lightcouch the code should read: