diff --git a/src/object_accessor.hpp b/src/object_accessor.hpp index d79a2f3d..41757e5f 100644 --- a/src/object_accessor.hpp +++ b/src/object_accessor.hpp @@ -180,7 +180,12 @@ namespace realm { size_t column = property.table_column; if (property.is_nullable && Accessor::is_null(ctx, value)) { - m_row.set_null(column); + if (property.type == PropertyTypeObject) { + m_row.nullify_link(column); + } + else { + m_row.set_null(column); + } return; }