From f3ced06db3245d08fcf096908f781cd0e0c79b47 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Wed, 14 Oct 2020 08:20:20 +0000 Subject: [PATCH] Update NHibernate to 5.3.3 (#475) +semver:feature --- src/Directory.Build.props | 2 +- .../Cfg/Db/OracleClientConfigurationTester.cs | 4 ++-- .../Cfg/Db/OracleDataClientConfigurationTester.cs | 4 ++-- .../Cfg/Db/OracleManagedDataClientConfigurationTester.cs | 4 ++-- src/FluentNHibernate/Cfg/Db/OracleClientConfiguration.cs | 2 ++ src/FluentNHibernate/Testing/PersistenceSpecification.cs | 2 ++ 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 84f184a17..c6f597081 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -39,7 +39,7 @@ - 5.2.7 + 5.3.3 diff --git a/src/FluentNHibernate.Testing/Cfg/Db/OracleClientConfigurationTester.cs b/src/FluentNHibernate.Testing/Cfg/Db/OracleClientConfigurationTester.cs index 172a98937..78a987a57 100644 --- a/src/FluentNHibernate.Testing/Cfg/Db/OracleClientConfigurationTester.cs +++ b/src/FluentNHibernate.Testing/Cfg/Db/OracleClientConfigurationTester.cs @@ -1,12 +1,12 @@ +using System; using FluentNHibernate.Cfg.Db; -using NHibernate; using NHibernate.Dialect; using NHibernate.Driver; using NUnit.Framework; namespace FluentNHibernate.Testing.Cfg.Db { - [TestFixture] + [TestFixture, Obsolete] public class OracleClientConfigurationTester { [Test] diff --git a/src/FluentNHibernate.Testing/Cfg/Db/OracleDataClientConfigurationTester.cs b/src/FluentNHibernate.Testing/Cfg/Db/OracleDataClientConfigurationTester.cs index e0d44adb3..9ee933843 100644 --- a/src/FluentNHibernate.Testing/Cfg/Db/OracleDataClientConfigurationTester.cs +++ b/src/FluentNHibernate.Testing/Cfg/Db/OracleDataClientConfigurationTester.cs @@ -46,7 +46,7 @@ public void ConnectionString_is_added_to_the_configuration() [Test] public void ConnectionString_leaving_out_the_StatementCacheSize_removes_from_string() { - OracleClientConfiguration.Oracle9 + OracleDataClientConfiguration.Oracle9 .ConnectionString(c => c .Server("db-srv") .Instance("mydatabase") @@ -59,7 +59,7 @@ public void ConnectionString_leaving_out_the_StatementCacheSize_removes_from_str [Test] public void ConnectionString_pooling_defaults_to_false_when_not_set() { - OracleClientConfiguration.Oracle9 + OracleDataClientConfiguration.Oracle9 .ConnectionString(c => c .Server("db-srv") .Instance("mydatabase") diff --git a/src/FluentNHibernate.Testing/Cfg/Db/OracleManagedDataClientConfigurationTester.cs b/src/FluentNHibernate.Testing/Cfg/Db/OracleManagedDataClientConfigurationTester.cs index 5bf749410..db3671598 100644 --- a/src/FluentNHibernate.Testing/Cfg/Db/OracleManagedDataClientConfigurationTester.cs +++ b/src/FluentNHibernate.Testing/Cfg/Db/OracleManagedDataClientConfigurationTester.cs @@ -46,7 +46,7 @@ public void ConnectionString_is_added_to_the_configuration() [Test] public void ConnectionString_leaving_out_the_StatementCacheSize_removes_from_string() { - OracleClientConfiguration.Oracle9 + OracleManagedDataClientConfiguration.Oracle9 .ConnectionString(c => c .Server("db-srv") .Instance("mydatabase") @@ -59,7 +59,7 @@ public void ConnectionString_leaving_out_the_StatementCacheSize_removes_from_str [Test] public void ConnectionString_pooling_defaults_to_false_when_not_set() { - OracleClientConfiguration.Oracle9 + OracleManagedDataClientConfiguration.Oracle9 .ConnectionString(c => c .Server("db-srv") .Instance("mydatabase") diff --git a/src/FluentNHibernate/Cfg/Db/OracleClientConfiguration.cs b/src/FluentNHibernate/Cfg/Db/OracleClientConfiguration.cs index c7dd5fed1..135baf3b8 100644 --- a/src/FluentNHibernate/Cfg/Db/OracleClientConfiguration.cs +++ b/src/FluentNHibernate/Cfg/Db/OracleClientConfiguration.cs @@ -1,8 +1,10 @@ +using System; using NHibernate.Dialect; using NHibernate.Driver; namespace FluentNHibernate.Cfg.Db { + [Obsolete("Use OracleManagedDataClientConfiguration or OracleDataClientConfiguration instead.")] public class OracleClientConfiguration : PersistenceConfiguration { protected OracleClientConfiguration() diff --git a/src/FluentNHibernate/Testing/PersistenceSpecification.cs b/src/FluentNHibernate/Testing/PersistenceSpecification.cs index 1735ffc1f..a7c8dafa7 100644 --- a/src/FluentNHibernate/Testing/PersistenceSpecification.cs +++ b/src/FluentNHibernate/Testing/PersistenceSpecification.cs @@ -31,7 +31,9 @@ public PersistenceSpecification(ISession session) public PersistenceSpecification(ISession session, IEqualityComparer entityEqualityComparer) { currentSession = session; +#pragma warning disable CS0618 // ISession.Transaction is obsolete hasExistingTransaction = currentSession.Transaction != null && currentSession.Transaction.IsActive || System.Transactions.Transaction.Current != null; +#pragma warning restore CS0618 this.entityEqualityComparer = entityEqualityComparer; }