I’m using the Unity Beta 3 build and for some reason when I create a view and then a live query against it every document that is returned by the QueryEnumerator is marked as deleted, even though I just created the documents. Not sure if I’ve done something wrong or if I’m just running into a beta bug?
I’ll describe my full setup, I setup a sync gateway connected to a couchbase server with a bucket sycn_gateway, I’m just using basic auth atm so I created a couple of users each with their username for a channel, (testing sending documents to a specific user). Then I used the sync rest api to create 4 documents that included a channels array that I put test.unity@test.com into (one of my test users). I checked the couchbase server webpage and the documents look fine in the database if I examine them with the edit button (without actually editing them, just to observe).
On the unity side I setup a pretty simple view where the map function check the document’s type field for the document type I specified in the document, and on match calls emit(doc["_id"], null);
I created a live query off of that, which seems to get the documents, but for some reason if you check the enumerator’s Document.Deleted flag it’s always true. If I just ignore that flag everything seems to work fine, just not sure why it’s always true.