From a83e0668c5b66b5ce207f85e94f77320ae1b0965 Mon Sep 17 00:00:00 2001 From: halgari <tbaldridge@gmail.com> Date: Wed, 3 Jul 2024 13:23:37 -0600 Subject: [PATCH] Fix the syntax in the template --- src/NexusMods.MnemonicDB.SourceGenerator/Template.weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NexusMods.MnemonicDB.SourceGenerator/Template.weave b/src/NexusMods.MnemonicDB.SourceGenerator/Template.weave index a73ef962..0dc96b07 100644 --- a/src/NexusMods.MnemonicDB.SourceGenerator/Template.weave +++ b/src/NexusMods.MnemonicDB.SourceGenerator/Template.weave @@ -171,7 +171,7 @@ public partial class {{= model.Name}} : __MODELS__.IModelFactory<{{= model.Name} {{each include in model.Includes}} public required {{= include.ToDisplayString()}}.New {{= include.Name}} { - init => { + init { if (Id != value.Id) throw new InvalidOperationException("The id of the included entity must match the id of the including entity."); }