todo example

This commit is contained in:
Ari Lazier 2015-08-24 09:22:37 -07:00
parent 6d1c000d09
commit 942af6a754
1 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ namespace realm {
// convert value to persisted object // convert value to persisted object
// for existing objects return the existing row index // for existing objects return the existing row index
// for new/updated objects return the row index // for new/updated objects return the row index
static size_t to_object_index(ContextType ctx, SharedRealm &realm, ValueType &val, Property &prop, bool try_update); static size_t to_object_index(ContextType ctx, SharedRealm &realm, ValueType &val, std::string &type, bool try_update);
// array value acessors // array value acessors
static size_t array_size(ContextType ctx, ValueType &val); static size_t array_size(ContextType ctx, ValueType &val);
@ -125,7 +125,7 @@ namespace realm {
row.nullify_link(column); row.nullify_link(column);
} }
else { else {
row.set_link(column, Accessor::to_object_index(ctx, realm, value, property, try_update)); row.set_link(column, Accessor::to_object_index(ctx, realm, value, property.object_type, try_update));
} }
break; break;
} }
@ -135,7 +135,7 @@ namespace realm {
size_t count = Accessor::array_size(ctx, value); size_t count = Accessor::array_size(ctx, value);
for (size_t i = 0; i < count; i++) { for (size_t i = 0; i < count; i++) {
ValueType element = Accessor::array_value_at_index(ctx, value, i); ValueType element = Accessor::array_value_at_index(ctx, value, i);
link_view->add(Accessor::to_object_index(ctx, realm, element, property, try_update)); link_view->add(Accessor::to_object_index(ctx, realm, element, property.object_type, try_update));
} }
break; break;
} }