-
-
Notifications
You must be signed in to change notification settings - Fork 735
fromLocalDatastore doesn't work for Relations #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @evgen-povt, in order to use ParseQuery<ParseObject> query = ParseQuery.getQuery("State");
List<ParseObject> objects = query.find();
for (ParseObject object : objects) {
// Pin all children explicitly
ParseObject.pinAll(object.getRelation("tests").getQuery().find());
object.pin();
} It is a little bit inconvenience and we will definitely improve it in the future. |
Hi @wangmengyan95, I believe the issue shouldn't be marked as a question, but the bug, because the iOS SDK works as expected, and doesn't require to pin every relation explicitly. |
@evgen-povt thanks for the information. |
For a query from a ParseRelation , even if I call ParseObject.pinAllInBackground( ) when the Object is retrieved from the remote DB, I cannot find it in the LocalDataStore on a next call. |
I confirm that the query result is not persisted in cache even like this : If then I call the same query from the localDatastore it will find the result only if I don't stop the application. If I restart the application the query from localDatastore will return an empty result. |
Used to have the same issue... Honestly, triple check with a real dataset if the localdatastore is not too slow (it will slow to a crawl REALLY fast, with just as few as 2000 objects in there. See issue #279) and consider using another more tested datastore (for example, Realm is awesome) |
There was the same bug in iOS SDK - https://developers.facebook.com/bugs/938451159512610/
The text was updated successfully, but these errors were encountered: