Skip to content

Commit

Permalink
Minor fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
dacharyc committed Nov 2, 2023
1 parent a92ac4c commit ee631fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions source/sdk/cpp/crud/create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,11 @@ Create an Object with a Set Property

.. versionadded:: v0.4.0-preview

You can create objects that contain ``std::set`` properties as you would any
Realm object, but you can only mutate a set property within a write transaction.
This means you can only set the value(s) of a mutable set property within a
write transaction.
You can create objects that contain :cpp-sdk:`set
<structrealm_1_1experimental_1_1managed_3_01std_1_1set_3_01T_01_5_01_4_01_4.html>`
properties as you would any Realm object, but you can only mutate a set
property within a write transaction. This means you can only set the value(s)
of a set property within a write transaction.

.. literalinclude:: /examples/generated/cpp/crud.snippet.write-set-object.cpp
:language: cpp
Expand Down
2 changes: 1 addition & 1 deletion source/sdk/cpp/crud/delete.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Delete Set Values
.. versionadded:: v0.4.0-preview

You can delete a :cpp-sdk:`set element
<structrealm_1_1experimental_1_1managed_3_01std_1_1set_3_01T_01_5_01_4_01_4.html>`,
<structrealm_1_1experimental_1_1managed_3_01std_1_1set_3_01T_01_5_01_4_01_4.html>`
with ``erase()``, or remove all elements from a set with ``clear()``.

.. literalinclude:: /examples/generated/cpp/crud.snippet.delete-set.cpp
Expand Down
8 changes: 4 additions & 4 deletions source/sdk/cpp/model-data/supported-types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ in your data model:
#. :cpp-sdk:`List
<structrealm_1_1internal_1_1bridge_1_1list.html>`, a type representing
:ref:`to-many relationships <cpp-list-collections>` in models.
# :cpp-sdk:`Set
<structrealm_1_1experimental_1_1managed_3_01std_1_1set_3_01T_01_5_01_4_01_4.html>`,
a type representing :ref:`to-many relationships <cpp-to-many-relationship>`
in models where values are unique.
#. :cpp-sdk:`Set
<structrealm_1_1experimental_1_1managed_3_01std_1_1set_3_01T_01_5_01_4_01_4.html>`,
a type representing :ref:`to-many relationships <cpp-to-many-relationship>`
in models where values are unique.
#. :cpp-sdk:`linking_objects
<structrealm_1_1experimental_1_1linking__objects.html>`, a type
representing :ref:`inverse relationships
Expand Down

0 comments on commit ee631fe

Please sign in to comment.