Hello,
I am having a trouble trying to remove a doc from a channel.
My doc is of type story and has a property named "channels".
My sync function says : if (doc.model_type == 'Story')
{channel(doc.channels);}
At first : channels = ["public"] and my doc is only in the "public" channel
Then, I change (programmatically) the channels property and adds "preload",
then channels = ["public","preload"] in my database. My doc is in both
channels : "public" & "preload"
Then I removes "preload" from channels property meaning channels =
["public"] in my database
But it seems that the sync function does not apply and does not remove the
doc from the "preload" channel. I can check this by calling the
URL /sync_gateway/_all_docs?channels=true'
keys:='["AC4BF703-19F8-41FA-8A4C-2EB8C9E50797"]' on my doc and I get
{
"rows": [
{
"id": "AC4BF703-19F8-41FA-8A4C-2EB8C9E50797",
"key": "AC4BF703-19F8-41FA-8A4C-2EB8C9E50797",
"value": {
"channels": [
"preload",
"public"
],
"rev": "40-e48f0af2d05ae75bd6c027556031ed4a"
}
}
],
"total_rows": 183649,
"update_seq": 642207
}
I can see that there is a new revision but the channels property (on sync
gateway side) keeps "preload" in it !!!!
I have been banging my heads on this for hours. Please help !!!!!
Thank you very much.
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/ed47324b-2abc-4602-ad56-0434f073d578%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.