Hi Jens,

Thank you for your answer.


Le lundi 7 avril 2014 17:25:19 UTC+1, Jens Alfke a écrit :
>
> Please include the exact versions of both Sync Gateway and Couchbase Lite 
> (including platform). From the logs it looks like you’ve got SG beta 3, but 
> if you’re on iOS you’ve still got CBL beta 2. 
>
> Actually, please update to SG beta 3.1 — it fixed some really critical 
> bugs with the change-cache, and your log includes a suspicious warning from 
> that cache. (Is that warning repeatable?) 
>
I was using SG 3.0 and is now updated thanks to you. For Couchbase Lite, 
I'm using the phonegap plugin and running my example on android devices. It 
seems to be the version 0.2.0 and so, the latest version according to 
Github.

By the way, it seems the link to go to the download page on Couchbase 
website <http://www.couchbase.com/download#cb-mobile> is not working 
anymore.

For the warning, I still have it but I'm not sure it's repeatable. The 
steps I follow from the start using Android devices.
1.Create a document and replicate it on the other.
2.Stop the connection from one device and make the conflict by updating the 
document on both devices
3.Connect again the device. You may need to "resume" the app, to have both 
revisions replicated ob both devices.
4.Delete one revision and make a put on the other one as I described above 
like this :

window.config.site.db.get([id, {"rev" : rev}], function(err, doc){
doc._deleted = true;
window.config.site.db.put([id, {"rev" : rev}], doc, function(){})
});

and then, I am doing a PUT with the other revision I want to keep

window.config.site.db.get([id, {"rev" : revToKeep}], function(err, doc){
window.config.site.db.put([id, {"rev" : revToKeep}], doc, function(){})
});

5.You should have the warning. If not, you may need to resume the app. 
***I don't know if I am very clear when i say "resume the app" ^^ . 
Basically, it's just going to the home page and then come back to the app.

>
> After that, if the bug persists, please file an issue on Github and we can 
> dive in. :) 
>

If you think I should file an issue for that, just tell me and I'll do it. 

>
> Actually one thing I noticed: I’m not too familiar with the JS APIs, but 
> it looks like you’re deleting a document by adding a “_deleted”:true 
> property to it. This is valid, but it will preserve all the other 
> properties of the document too, which may not be what you want. The easiest 
> way to delete is to use the DELETE method. Or you can do a PUT as you’re 
> doing, but with a JSON body containing only the _deleted and _rev 
> properties. 
>

I would like to use the DELETE method but actually, I can't find out how to 
use it in the JS APIs. Do you have any documentation or just any idea how 
to do it ?



> —Jens



Regards,

Bart 

-- 
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/2477e8fd-71eb-465a-bb68-7da89e2a36ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to