hi,
I am trying to fetch the document using view and query.
I am running query.run and getting QueryEnumerator,
and tryin to fetch values by QueryEnumerator ref .getdocument() function,
It giving document which i have store,
Now,
At the time of storing document i have stored documet as (key , my POJO class object),
at at the time of retrieval it giving me JAVA object , i have tried to do typecasting but it is giving error as follows:
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.kpit.ecueditor.newdtc.entity.Dtc
eventhough it should store the object in Dtc object but it is not allowing me, and i am not able to retrieve data from objecy,
Not sure I fully understand the issue you’re encountering. You should store the document as a set of JSON key, value pairs and when retrieving them you can deserialize the JSON as a POJO class.
@jamiltz
i have another one doubt , i am deleting document from couchbase lite (offline local db) , but by sync gateway it is connected to the server , and push -pull operations are going on,
my doubt is after deleting that document is it pulled again from server or it’ll also get deleted from server?