Skip to content

Commit

Permalink
Generate async files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and gliljas committed Oct 24, 2024
1 parent dfa4734 commit e63dca4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/NHibernate/Async/Id/Enhanced/OptimizerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ public override async Task<object> GenerateAsync(IAccessCallback callback, Cance
generationState.LastSourceValue = await (callback.GetNextValueAsync(cancellationToken)).ConfigureAwait(false);
generationState.Value = generationState.LastSourceValue;
// handle cases where initial-value is less than one (hsqldb for instance).
while (generationState.Value < 1)
generationState.Value++;
if (generationState.Value < 1)
{
generationState.Value = 1;
}
}

return Make(generationState.Value++);
Expand Down

0 comments on commit e63dca4

Please sign in to comment.