-
Notifications
You must be signed in to change notification settings - Fork 60
CouchDbConnector queryView(ViewQuery query) vs. queryView(ViewQuery query, Class<T> type) #85
Comments
this looks like a duplicate of https://github.com/couchbase/couchbase-lite-android/issues/39 and or https://github.com/couchbase/couchbase-lite-android/issues/38 |
I don't think this is a duplicate of those, re-opening. |
Maybe this issue will go away when we upgrade to ektorp 1.4 |
Assuming 1.4 will fix this, closing as duplicate of https://github.com/couchbase/couchbase-lite-android/issues/38 |
I had this issue. I think the problem is that when you emit an ObjectMapper objectMapper = new ObjectMapper()
for (ViewResult.Row row : results.getRows()) {
doc = objectMapper.readValue(row.getDoc(), clazz)
// add the doc to a list
} Namely, the difference to CouchDB is that I doubt it’s an Ektorp issue. |
@stanch thanks for this insight. Re-opening based on your comment. |
Do you think this could be tracked in couchbase-lite-android? |
One more thing, there is an |
@stanch sure - can you open a bug in couchbase-lite-android which points back to this one, and then close this one? (to avoid duplication)
Lets consider that a separate issue for now. Can you file a ticket to track it? Be explicit and give an example of the actual api and the expected api. |
When running a query using
queryView(ViewQuery)
, I get the right results inViewResult
. However, when usingqueryView(ViewQuery, Class<T>)
, I get 0 results.My TDView looks like:
My repository looks like:
Result from queryView(ViewQuery) looks like:
ignoreNotFound = false
offset = 0
rows = [org.ektorp.ViewResult$Row@4155a408, org.ektorp.ViewResult$Row@4156a648]
totalRows = 2
updateSeq = null
Result from queryView(ViewQuery, Class) looks like:
modCount = 0
Is there a discrepancy in behaviour of these methods? Or could there be an issue in the mapping?
The text was updated successfully, but these errors were encountered: