Skip to main content

Module active_entity_ext

Module active_entity_ext 

Source
Expand description

Relationship traversal from a loaded record handle.

ActiveEntity and ActiveRecord live in vantage-dataset and know nothing about Table, so this Table-aware extension is provided here as a trait. It is the record-level equivalent of table.get_ref_from_row(...): given a launch you loaded with get_entity (typed) or get_value_record (untyped), launch.get_ref::<LaunchCrew>("launch_crew") returns the child table scoped to that launch (and carrying the foreign-key invariant, so inserts conform — see Table::add_invariant).

ActiveEntity wraps a typed struct with no id column, so it serializes the entity and injects its id before traversing. ActiveRecord already holds the raw row (including id/foreign-key columns), so its impl forwards directly.

Traits§

GetRefExt
Traverse a relation from a loaded record.