From 3295c8024915a729c884ac69f260c891981985c7 Mon Sep 17 00:00:00 2001 From: IvanIlyichev Date: Wed, 26 Jul 2023 12:04:32 +0300 Subject: [PATCH] fix: fixed HiLo sequence configuration on PostgreSql --- .../src/Shesha.NHibernate/NHibernate/Maps/Conventions.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shesha-core/src/Shesha.NHibernate/NHibernate/Maps/Conventions.cs b/shesha-core/src/Shesha.NHibernate/NHibernate/Maps/Conventions.cs index 8596106a4..3e54a983b 100644 --- a/shesha-core/src/Shesha.NHibernate/NHibernate/Maps/Conventions.cs +++ b/shesha-core/src/Shesha.NHibernate/NHibernate/Maps/Conventions.cs @@ -66,7 +66,13 @@ public Conventions(Func> idMapper = null) { return (id => { - id.Generator(NHGens.HighLow, g => g.Params(new { table = "Frwk_HiLoSequences", sequence = "FrameworkSequence", column = "NextValue", max_lo = "100" })); + id.Generator(NHGens.HighLow, g => g.Params( + new { + table = "Frwk_HiLoSequences".DoubleQuote(), // Important: NH doesn't apply Naming Strategy specified in the configuration, we have to quote names manually here + column = "NextValue".DoubleQuote(), + sequence = "FrameworkSequence", + max_lo = "100" + })); }); } else if (t == typeof(Guid))