observe_rsc_get_raw/3
Convert raw stored resource data to its current representation.
Use this notification for resource migrations, including changes to property
structures and serialization formats, such as converting legacy props values
to JSON-friendly structures for props_json.
Type: foldr
Runs after decoding stored properties, before caching and rsc_get. It also
runs when the database layer reads existing rsc properties to merge an update;
that accumulator contains only custom properties, without database columns
(is_props_only = true). Full raw resource reads set is_props_only = false.
Observers must be idempotent and only convert stored data. Every returned value
must be suitable for saving in the rsc record. Do not add computed fields,
request-specific values, or perform database writes. Use rsc_get for computed
fields. Reads themselves do not persist the conversion.
#rsc_get_raw{} properties:
- id:
m_rsc:resource_id() - is_props_only:
boolean(), defaults tofalse.truemeans only the mergedprops/props_jsonproperties;falsemeans the full raw resource record.