diff --git a/src/doc/converters.rst b/src/doc/converters.rst index d7feab82dd366ff442db76e8ce21016bcb65cf41..f59e6d3dff0a1f75dc4e0e5bcbbee0b4ceb7e81d 100644 --- a/src/doc/converters.rst +++ b/src/doc/converters.rst @@ -362,12 +362,22 @@ exactly a Record as an argument and needs to return that Record after doing whatever custom treatment is needed. Additionally, it is given the ``RecordStore`` and the ``ValueStore`` in order to be able to access the records and values that have already been defined from -within ``referenced_record_callback``. It is applied to all Records -that are created from the dictionary and it can be used to, e.g., -transform values of some properties, or add special treatment to all -Records of a specific type. ``referenced_record_callback`` is applied -**after** the properties from the dictionary have been applied as -explained above. +within ``referenced_record_callback``. Such a function might look the +following: + +.. code-block:: python + + def my_callback(rec: db.Record, records: RecordStore, values: GeneralStore): + # do something with rec, possibly using other records or values from the stores... + rec.description = "This was updated in a callback" + return rec + +It is applied to all Records that are created from the dictionary and +it can be used to, e.g., transform values of some properties, or add +special treatment to all Records of a specific +type. ``referenced_record_callback`` is applied **after** the +properties from the dictionary have been applied as explained above. + Further converters ++++++++++++++++++