Skip to content

v6.9.0

@itechdom itechdom tagged this 28 May 18:36
Two changes:

1) Refactor MockPersistenceAdapter to consume canonical @almadar/core
EntityField directly. Drop the local interface + the mapFieldForMock
translator in OrbitalServerRuntime. The translator was a drift point —
it had already dropped items/properties once (fixed in 6.8.0) and would
drop any future EntityField knob until each was hand-threaded through.
Canonical types narrow at the use site via discriminated-union switches
on field.type so per-variant fields (values, items, properties,
relation) stay type-safe without record-typed casts. Floor on
@almadar/core bumped to ^9.2.0 to pull the extended FieldFormat
(image / avatar / thumbnail variants merged into canonical).

2) Add linkRelationFields() post-seed pass that walks every row of every
registered entity and fills `type: "relation"` fields with real IDs
from the target entity's store. Without it, the lolo lowerer fix at
orbital-rust/crates/orbital-lolo/src/lower.rs (which now emits
`type: relation, cardinality: many` for `[EntityName]` array fields)
would still leave relation arrays as empty placeholders — populateRelations
in this same module has nothing to hydrate. Self-referential relations
(Comment.replies: [Comment]) get 2-4 sibling IDs excluding self;
cross-entity relations pick from the target store. Runs after every
registerEntity so cross-entity relations link whichever direction
the entity registration happens.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Assets 2
Loading