Skip to content

Release v15.36.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 09:38
e32affb

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 CHR0023 analyzer that warns when a [ChildrenFrom] collection omits parentKey and 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. Specify parentKey to 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 from EventContext.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 omitted parentKey no 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 raw Guid), so the children resolve. When more than one event property still matches, the first by declaration order is used; specify parentKey to disambiguate.
  • [ChildrenFrom] child collections now project in ReadModelScenario<T> when a child value is a decimal or TimeSpan; previously such collections materialized empty.