diff --git a/src/js_realm_object.hpp b/src/js_realm_object.hpp index 4428ea3d..478e9e2c 100644 --- a/src/js_realm_object.hpp +++ b/src/js_realm_object.hpp @@ -139,12 +139,15 @@ bool RealmObjectClass::set_property(ContextType ctx, ObjectType object, const template std::vector> RealmObjectClass::get_property_names(ContextType ctx, ObjectType object) { auto realm_object = get_internal>(object); - auto &properties = realm_object->get_object_schema().persisted_properties; + auto &object_schema = realm_object->get_object_schema(); std::vector names; - names.reserve(properties.size()); + names.reserve(object_schema.persisted_properties.size() + object_schema.computed_properties.size()); - for (auto &prop : properties) { + for (auto &prop : object_schema.persisted_properties) { + names.push_back(prop.name); + } + for (auto &prop : object_schema.computed_properties) { names.push_back(prop.name); }