Skip to content

Commit

Permalink
Fixed Column names quoting (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Lybenko <[email protected]>
Fixes #15
  • Loading branch information
Hiller authored and albertodall committed Sep 6, 2021
1 parent de6f2d1 commit 2f2c377
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using IdentityServer4.Stores;
using Microsoft.Extensions.Hosting;
using NHibernate;
using NHibernate.Dialect;
using NHibernate.Tool.hbm2ddl;

// ReSharper disable MemberCanBePrivate.Global
Expand Down Expand Up @@ -124,6 +125,9 @@ private static IIdentityServerBuilder AddNHibernatePersistenceSupport(
databaseConfiguration.AddConfigurationStoreMappings(configurationStoreOptions);
databaseConfiguration.AddOperationalStoreMappings(operationalStoreOptions);

//We need this to quote fields named with reserved keyword
SchemaMetadataUpdater.QuoteTableAndColumns(databaseConfiguration, Dialect.GetDialect(databaseConfiguration.Properties));

// Registers NHibernate components
builder.Services.AddSingleton(databaseConfiguration.BuildSessionFactory());
builder.Services.AddScoped(provider =>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ That's why it's not recommended to use this provider in production with an in-me
I wish to thank all the contributors to this project:

- [Ivan](https://github.com/mtivan)
- [Hiller](https://github.com/Hiller)

# Acknowledgements
This package has been built using these awesome Open Source projects:
Expand Down
10 changes: 9 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
## Build 1.1.7
## Build 1.1.8
_Release notes - IdentityServer4.NHibernate - Version 1.1.8_

__New features__
- No new features

__Resolved issues__
- [#15](https://github.com/albertodall/IdentityServer4.NHibernate/issues/15) - SqlException: Incorrect syntax near the keyword 'Key'. ([@Hiller](https://github.com/Hiller))

## Build 1.1.7
_Release notes - IdentityServer4.NHibernate - Version 1.1.7_

Expand Down

0 comments on commit 2f2c377

Please sign in to comment.