Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Jun 18, 2024
1 parent 591745a commit 9ab20d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/realm/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,6 @@ TableRef Group::add_table_with_primary_key(StringData name, DataType pk_type, St

auto table = do_add_table(name, table_type, false);

if (m_allow_additional_properties && name.begins_with(g_class_name_prefix)) {
table->do_add_additional_prop_column();
}

// Add pk column - without replication
ColumnAttrMask attr;
if (nullable)
Expand Down Expand Up @@ -752,6 +748,10 @@ Table* Group::do_add_table(StringData name, Table::Type table_type, bool do_repl
Table* table = create_table_accessor(j);
table->do_set_table_type(table_type);

if (m_allow_additional_properties && name.begins_with(g_class_name_prefix)) {
table->do_add_additional_prop_column();
}

return table;
}

Expand Down
3 changes: 2 additions & 1 deletion src/realm/obj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class Obj {
return get_additional_prop(col_name);
}
Mixed get_additional_prop(StringData col_name) const;

Mixed get_primary_key() const;

template <typename U>
Expand Down Expand Up @@ -215,6 +216,7 @@ class Obj {
}
return set_additional_prop(col_name, Mixed(value));
}
Obj& set_additional_prop(StringData prop_name, const Mixed& value);

Obj& set_null(ColKey col_key, bool is_default = false);
Obj& set_null(StringData col_name, bool is_default = false)
Expand Down Expand Up @@ -404,7 +406,6 @@ class Obj {
return _get_linked_object(get_column_key(link_col_name), link);
}

Obj& set_additional_prop(StringData prop_name, const Mixed& value);
void set_int(ColKey::Idx col_ndx, int64_t value);
void set_ref(ColKey::Idx col_ndx, ref_type value, CollectionType type);
void add_backlink(ColKey backlink_col, ObjKey origin_key);
Expand Down

0 comments on commit 9ab20d9

Please sign in to comment.