CBLite 2.0.0DB22: how to query and update a document by a custom property (and not the ID)

If you don’t know the Id of document, you have to query for it . Once you get the Id, you then fetch the document , get a mutable copy of the document and then update.
BTW, you don’t have to do a select result.all() in your query. Once you get the document, you can use toDictionary or toMap to get the contents to update.

1 Like