Unity B3 Live Query all documents marked as deleted?


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.


Yeah, that’s a bug. I’ve filed issue 480 on Github on your behalf to track this.


And thanks for the report! Please feel free to create issues directly on Github in the future.


Ah ok cool thanks! Will use github in the future.


I’m aware of this issue and it has been since fixed :).


Cool, good to hear! :slight_smile:


@borrrden that’s what I get for not searching before filing. :blush:


No problem, as stated in the contributing document we prefer duplicates to staying silent :smiley: