use newest object store

This commit is contained in:
Yavor Georgiev 2017-07-05 17:09:48 +02:00 committed by kristiandupont
parent b17dcddd17
commit 05cce5aeec
2 changed files with 6 additions and 3 deletions

View File

@ -38,9 +38,9 @@
"conditions": [
["use_realm_debug", {
"defines": [ "REALM_DEBUG=1" ],
"libraries": [ "-lrealm<(realm_library_suffix)-dbg" ]
"libraries": [ "-lrealm-dbg" ]
}, {
"libraries": [ "-lrealm<(realm_library_suffix)" ]
"libraries": [ "-lrealm" ]
}]
]
},

View File

@ -186,7 +186,10 @@ typename T::Object ResultsClass<T>::create_sorted(ContextType ctx, const U &coll
}
auto table = realm::ObjectStore::table_for_object_type(realm->read_group(), object_schema.name);
return create_instance(ctx, collection.sort({*table, std::move(columns), std::move(ascending)}));
DescriptorOrdering ordering;
ordering.append_sort({*table, std::move(columns), std::move(ascending)});
auto results = new realm::js::Results<T>(realm, collection.get_query(), std::move(ordering));
return create_object<T, ResultsClass<T>>(ctx, results);
}
template<typename T>