-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limiting Joins on children to be oriented around the IdentifiedBy pro…
…perty - supporting arbitrary On() will be in conflict with how we identify the children today
- Loading branch information
Showing
9 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
12 changes: 12 additions & 0 deletions
12
...e/Clients/DotNET/Projections/MissingIdentifiedByPropertyExpressionWhenJoiningWithEvent.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Cratis. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Cratis.Chronicle.Projections; | ||
|
||
/// <summary> | ||
/// Exception that is thrown when the on property expression is missing for the root projection. | ||
/// </summary> | ||
/// <param name="modelType">Type of model joining with event.</param> | ||
/// <param name="eventType">Type of event that is being joined.</param> | ||
public class MissingIdentifiedByPropertyExpressionWhenJoiningWithEvent(Type modelType, Type eventType) | ||
: Exception($"Missing the identified by property expression for model of type '{modelType.FullName}' when joining with event of type '{eventType.FullName}'. Use the `.IdentifiedBy()` method on the child builder."); |
This file contains 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
12 changes: 12 additions & 0 deletions
12
Source/Clients/DotNET/Projections/OnPropertyShouldNotBeSpecifiedForChildJoin.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Cratis. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Cratis.Chronicle.Projections; | ||
|
||
/// <summary> | ||
/// Exception that gets thrown when on property should not be specified for child join. | ||
/// </summary> | ||
/// <param name="modelType">Type of model joining with event.</param> | ||
/// <param name="eventType">Type of event that is being joined.</param> | ||
public class OnPropertyShouldNotBeSpecifiedForChildJoin(Type modelType, Type eventType) | ||
: Exception($"On property should not be specified for child join for model of type '{modelType.FullName}' when joining with event of type '{eventType.FullName}', it will implicitly use what is set using the `IdentifiedBy()"); |