Class E188_SoftDeleteReference

Assembly: redb.Examples.dll

Verifies the soft-delete read-path fix (_id_scheme = -10).
A surviving Employee references a Project via the RedbObject _Object edge
(EmployeeProps.CurrentProject). When the Project is soft-deleted
(moved to trash, _id_scheme = -10 — NOT purged), loading the Employee must
NOT materialize the tombstone through the nested reference.
Invariant checked (edition-agnostic):
loaded.CurrentProject?.Props == null
Free nulls the reference outright (get_object_json returns NULL for the
trashed target); Pro leaves an id-only placeholder with Props == null
(the trashed target is filtered out of Materialization_SelectObjectsByIds,
so it is never substituted). Either way the trashed object is not loaded as
live data. The _values._Object pointer is left intact, so the reference
returns once the target is restored from trash.

[ExampleMeta("E188", "Soft-Delete - Nested Reference Not Materialized", "Core", ExampleTier.Free, 188, new string[] { "SoftDelete", "Reference", "Trash", "-10" }, RelatedApis = new string[] { "IRedbService.SoftDeleteAsync", "RedbObject<TProps>" })]
public class E188_SoftDeleteReference : ExampleBase

Inheritance

Object→ExampleBase→E188_SoftDeleteReference

Inherited Members

Methods

RunAsync(IRedbService)

Run the example and return result.

public override Task<ExampleResult> RunAsync(IRedbService redb)