Skip to content

Commit

Permalink
fix: fixed HiLo sequence configuration on PostgreSql
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIlyichev committed Jul 26, 2023
1 parent e3cb72f commit 3295c80
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ public Conventions(Func<Type, Action<IIdMapper>> 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))
Expand Down

0 comments on commit 3295c80

Please sign in to comment.