Android-DDP icon indicating copy to clipboard operation
Android-DDP copied to clipboard

Reduction of count from the collection

Open musriabhijit opened this issue 8 years ago • 3 comments

@ocram when we subscribe to the endpoint with unique id, after subscription the unique id document data is removed from the particular collection

eg :mMeteor.subscribe("user.id", userID); the above userID document is removed from the particular collection Database

musriabhijit avatar Nov 30 '16 07:11 musriabhijit

If you call

mMeteor.subscribe("user.id", userID);

then it will subscribe to data from the server, unless you didn't publish something called user.id on the server. Use the listener with the optional parameter (see README) to check if the subscription succeeds or not. If it does, you will get additional data from the server.

Please insert log statements in onDataAdded, onDataChanged and onDataRemoved to see what's actually happening there. This way, you can precisely track down what's being added and removed and why that's happening.

ocram avatar Nov 30 '16 14:11 ocram

my question is the document from the collection get removed when i subscribe to a particular element in other activity and in when i come back to same activity the particular document in the collection gets removed

musriabhijit avatar Dec 01 '16 06:12 musriabhijit

Can you provide any specific (step-by-step) description of how to re-produce this? Perhaps even with a minimum code example. Otherwise, we can't re-produce this right now and have never heard about that problem, so we'd close this until there is more evidence.

ocram avatar Jan 15 '17 14:01 ocram