Skip to content

Fix NullReferenceException in EnrichUsingEntityQuery cache handling#4144

Merged
jeremydmiller merged 1 commit intomasterfrom
fix-enrichusingentityquery-null-cache
Feb 16, 2026
Merged

Fix NullReferenceException in EnrichUsingEntityQuery cache handling#4144
jeremydmiller merged 1 commit intomasterfrom
fix-enrichusingentityquery-null-cache

Conversation

@jeremydmiller
Copy link
Member

Summary

  • The cache parameter passed to EnrichUsingEntityQuery callbacks is nullable — it's null when there is no upstream aggregate cache for the entity type (e.g. reference data like RoutingReason)
  • Added null checks for cache.TryFind() and cache.Store(), plus a local Dictionary fallback for lookups when the cache is unavailable
  • Fixes multi_stage_projections.end_to_end test failures (both Single and Conjoined tenancy styles)

Test plan

  • dotnet test --filter "multi_stage_projections" — both tenancy styles pass
  • dotnet test --filter "end_to_end_with_composite_projection" — still passes
  • Full DaemonTests suite — 176/176 pass (0 failures)

🤖 Generated with Claude Code

…gEntityQuery

The cache parameter in EnrichUsingEntityQuery is nullable when there is no
upstream aggregate cache for the entity type (e.g. reference data like
RoutingReason). Added null checks and a local dictionary fallback for lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant