diff --git a/realm.gypi b/realm.gypi index 4ee0960a..5d8ecbd2 100644 --- a/realm.gypi +++ b/realm.gypi @@ -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" ] }] ] }, diff --git a/src/js_results.hpp b/src/js_results.hpp index 5f64cd74..f10e8b88 100644 --- a/src/js_results.hpp +++ b/src/js_results.hpp @@ -186,7 +186,10 @@ typename T::Object ResultsClass::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(realm, collection.get_query(), std::move(ordering)); + return create_object>(ctx, results); } template