Skip to content

Commit bc4e604

Browse files
erdtsieckjeremydmiller
authored andcommittedJan 24, 2025·
#3634 do not validate tenancy mapping of live stream aggregations
1 parent d0b43b7 commit bc4e604

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎src/DaemonTests/event_projection_scenario_tests.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public async Task happy_path_test_with_live_projection_multi_tenanted()
9292

9393
await theStore.Advanced.EventProjectionScenario(scenario =>
9494
{
95-
scenario.Append(Guid.NewGuid(), new CreateUser { UserId = id, UserName = "Kareem" });
95+
scenario.Append(id, new CreateUser { UserId = id, UserName = "Kareem" });
9696
scenario.DocumentShouldNotExist<User>(id);
9797
});
9898

@@ -308,12 +308,10 @@ public class LiveUser
308308
public Guid Id { get; set; }
309309
public string UserName { get; set; }
310310

311-
public LiveUser Create(CreateUser create)
312-
{
313-
return new LiveUser
311+
public static LiveUser Create(CreateUser create) =>
312+
new()
314313
{
315314
Id = create.UserId,
316315
UserName = create.UserName
317316
};
318-
}
319317
}

‎src/Marten/Events/Aggregation/GeneratedAggregateProjectionBase.Validation.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ internal override IEnumerable<string> ValidateConfiguration(StoreOptions options
2626
if (options.Events.TenancyStyle != mapping.TenancyStyle
2727
&& (options.Events.TenancyStyle == TenancyStyle.Single
2828
|| options.Events is
29-
{ TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false })
29+
{ TenancyStyle: TenancyStyle.Conjoined, EnableGlobalProjectionsForConjoinedTenancy: false }
30+
&& Lifecycle != ProjectionLifecycle.Live)
3031
)
3132
{
3233
yield return

0 commit comments

Comments
 (0)
Please sign in to comment.