Skip to content

Comments

Add global EntityDefaults for OnMissing and MaybeSoftDeleted#2188

Merged
jeremydmiller merged 1 commit intomainfrom
global-entity-defaults
Feb 15, 2026
Merged

Add global EntityDefaults for OnMissing and MaybeSoftDeleted#2188
jeremydmiller merged 1 commit intomainfrom
global-entity-defaults

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Adds WolverineOptions.EntityDefaults to configure global default OnMissing and MaybeSoftDeleted behavior for all entity-loading attributes ([Entity], [Document], [Aggregate], [ReadAggregate], [WriteAggregate])
  • Uses nullable backing fields so per-attribute settings always take precedence over global defaults
  • Removes TODO comments in HttpChain and HandlerChain that called for this feature

Closes #1618

Test plan

  • Marten message handler tests: global default changes behavior, attribute override wins, end-to-end with good data
  • HTTP endpoint tests: global default changes response to ProblemDetails 404, attribute override returns plain 404
  • Existing entity attribute tests pass with no regressions

🤖 Generated with Claude Code

Allow users to configure default OnMissing and MaybeSoftDeleted behavior
globally via WolverineOptions.EntityDefaults, so they don't have to set
these on every [Entity], [Document], [Aggregate], [ReadAggregate], and
[WriteAggregate] attribute. Per-attribute settings still take precedence.

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.

Central setup for default OnMissing and MaybeSoftDeleted behavior for all attibutes ([Entity], [Document], [Aggregate], etc.)

1 participant