Hi,
Can we create a document and Delete a document and create a document with the Same ID by using Couchbase Mobile Lite iOS SDK?
Example: Create a Document with ID ‘Doc_1’ in Couchbase Mobile Lite iOS and do some operations on document and revisions will be 10_xxx and now delete a document from mobile lite and it will delete form Mobile Lite, Sync gateway and Server. So after you can create a document with the same id ‘Doc_1’. This document is not creating immediately.
How can we achieve this? Please share the correct documentation for this.
Yes, you can do this. Have you tried it? If it didn’t work correctly, please describe in detail what you did, what you expected to happen, and what actually happened.
Document not created and received conflict errors.
Steps to Reproduce:
Create a Document with our own Document ID (For Example Doc_1 ) from iOS app using CBL 2.7 SDK
Do some operations Document (Doc_1) and Then revision will be 100_xxx
Now Delete document from iOS App using CBL 2.7 SDK
So If we search this document from Server, it will not found. But if we search with Sync gateway Public Rest API it will give result like reason: “deleted” and error: “Not Found”.
Now create same a document with same Document ID (Doc_1). In Mobile Lite Document created with revision ID 1_xxx and giving 409 conflict error. Here revision ID 1_xxx because when we delete document it will not available in our mobile phone.
Is it cause of tombstones? Because tombstone always wins over a documentation update?
Jens, We are customer to Couchbase. So we posted with all the logs and other details to Support Team.
So you can find details from there and you can check following ticket.