Skip to content

Commit

Permalink
Fix on the quick append function generation for causation ids
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydmiller committed Jul 4, 2024
1 parent b19e782 commit f433b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/EventSourcingTests/QuickAppend/quick_append_end_to_end.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public async Task append_with_metadata_using_function()
theSession.Events.StartStream<Quest>(new QuestStarted(), new MembersJoined(1, "Hobbiton", "Frodo", "Sam")).Id;
await theSession.SaveChangesAsync();

theSession.Events.Append(streamId, new MembersDeparted { Members = new string[] { "Frodo" } });
await theSession.SaveChangesAsync();

var events = await theSession.Events.FetchStreamAsync(streamId);

foreach (var e in events)
Expand Down
2 changes: 1 addition & 1 deletion src/Marten/Events/Schema/QuickAppendEventFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void WriteCreateStatement(Migrator migrator, TextWriter writer)
{
metadataColumns += ", " + CausationIdColumn.ColumnName;
metadataParameters += ", causation_ids varchar[]";
metadataValues += ", causations_ids[index]";
metadataValues += ", causation_ids[index]";
}

if (table.Columns.OfType<CorrelationIdColumn>().Any())
Expand Down

0 comments on commit f433b52

Please sign in to comment.