Release v15.36.0
Summary
Fixes correctness bugs in model-bound projections and the ReadModelScenario<T> test harness, so projections that are valid in production also build and project correctly. Two of these ([FromAll]/[FromEvery] on positional records, and [ChildrenFrom] parent-key inference) affect the real runtime, not only the test harness. Also adds a compile-time analyzer for the ambiguous [ChildrenFrom] parent-key case.
Added
- A
CHR0023analyzer that warns when a[ChildrenFrom]collection omitsparentKeyand the parent key cannot be inferred unambiguously — the event has more than one property of the parent read model's identifier type besides the child key. SpecifyparentKeyto resolve it.
Changed
- The
ReadModelScenario<T>test harness gives each driven event a distinct, monotonically increasing occurred time, so a time-based[FromAll](for example a last-updated value mapped fromEventContext.Occurred) reflects append order.
Fixed
[FromAll]and[FromEvery]are now applied when declared on a positional record property ([property: FromAll(...)]). Previously the attribute was dropped, so the property was never projected, and[FromAll(contextProperty: ...)]was additionally mis-converted into a non-existent event-property lookup.[ChildrenFrom]with an omittedparentKeyno longer mis-infers the child key as the parent key when the parent identifier and the event's child key share a type (such as a rawGuid), so the children resolve. When more than one event property still matches, the first by declaration order is used; specifyparentKeyto disambiguate.[ChildrenFrom]child collections now project inReadModelScenario<T>when a child value is adecimalorTimeSpan; previously such collections materialized empty.