Repository navigation
GH-5298 Lightweight saga storage honours the AddSagaType table name - #5304
Merged
jeremydmiller merged 1 commit intoOct 31, 2026
Merged
Conversation
The generated saga code reaches the schema through MessageDatabase<T>.EnrollAndFetchSagaStorage, which built a convention-named SagaTableDefinition and so ignored the registered table name for SQL Server, PostgreSQL, MySQL and SQLite. The base class now remembers the registered definitions. Oracle resolves through SagaSchemaFor directly and was not affected. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5298
The generated saga code goes through
MessageDatabase<T>.EnrollAndFetchSagaStorage, whose schema factory path builtnew SagaTableDefinition(typeof(TSaga), null), discarding the table name given toAddSagaType<T>(tableName). The table was created under the registered name but reads/writes used<saga>_saga.Fix:
MessageDatabase<T>keeps the registered definitions (RegisterSagaDefinition/SagaDefinitionFor); the SQL Server, PostgreSQL, MySQL and SQLite stores register theirs in the constructor and use the lookup inSagaSchemaForfallbacks. Oracle does not derive fromMessageDatabase<T>and resolves viaSagaSchemaForusing the registered definition, so it was not affected (no test added for it).Tests: new
saga_with_custom_table_name_5298in SqlServerTests, PostgresqlTests, MySqlTests and SqliteTests runs a saga and asserts the row is in the custom table and the convention table was not created. Confirmed red on all four with the fix reverted, green with it; existing*.Sagasnamespaces pass on all four. The reporter's zip was not run.🤖 Generated with Claude Code