Avoid Table::clear() when using partial sync (#1680)

* Avoid Table::clear() when using partial sync
* Updated to sync 3.0.0-beta.10
* Update object store
This commit is contained in:
Kenneth Geisshirt 2018-03-03 12:55:11 +01:00 committed by GitHub
parent e93ff333ed
commit 1f2173b599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -18,8 +18,8 @@
* [Sync] Added class `Realm.Sync.Subscription` to support partial synced Realms.
### Internal
* Updated to Realm Core 5.8.0.
* Updated to Realm Sync 3.0.0-beta.9.
* Updated to Realm Core 5.3.0.
* Updated to Realm Sync 3.0.0-beta.10.
* Tested against Realm Object Server 3.0.0-alpha.8.

View File

@ -898,7 +898,13 @@ void RealmClass<T>::delete_all(ContextType ctx, ObjectType this_object, Argument
}
for (auto objectSchema : realm->schema()) {
ObjectStore::table_for_object_type(realm->read_group(), objectSchema.name)->clear();
auto table = ObjectStore::table_for_object_type(realm->read_group(), objectSchema.name);
if (realm->is_partial()) {
realm::Results(realm, *table).clear();
}
else {
table->clear();
}
}
}

@ -1 +1 @@
Subproject commit bb559df9237ece49f9c889993f7c1aff619b48f9
Subproject commit b250563ea1eb9f32ec7dbd76f2c6f8f1a26914cc