I’m debugging an issue in an Android app running CBL 1.4 where, while the app is running, a document is updated with
Document doc = this.db.getDocument(documentId);
String docJson = new Gson().toJson(doc.getProperties());
and later retrieved with
Document doc = db.getExistingDocument(docId);
if (doc != null) {
properties = doc.getCurrentRevision().getProperties();
}
, but with the old revision id. If the app is restarted the updated document+revision ID can be seen, but not before.
Similar logic in an iOS app does not show this behaviour.
Anything that might be going wrong here? Do I need to explicitly save the revision ID and pass that to getDocument
?