diff --git a/src/object-store/list.hpp b/src/object-store/list.hpp index fdde4c62..934c56ce 100644 --- a/src/object-store/list.hpp +++ b/src/object-store/list.hpp @@ -27,7 +27,7 @@ namespace realm { public: List(SharedRealm &r, const ObjectSchema &s, LinkViewRef l) : m_realm(r), object_schema(s), m_link_view(l) {} - const ObjectSchema &object_schema; + const ObjectSchema object_schema; SharedRealm realm() { return m_realm; } size_t size(); diff --git a/src/object-store/object_accessor.hpp b/src/object-store/object_accessor.hpp index ffa3edb6..2f52619c 100644 --- a/src/object-store/object_accessor.hpp +++ b/src/object-store/object_accessor.hpp @@ -27,7 +27,7 @@ namespace realm { template static inline Object create(ContextType ctx, SharedRealm realm, ObjectSchema &object_schema, ValueType value, bool try_update); - const ObjectSchema &object_schema; + const ObjectSchema object_schema; SharedRealm realm() { return m_realm; } Row row() { return m_row; }