diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 84f184a17..7aa10497c 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -38,10 +38,6 @@
portable
-
- 5.2.7
-
-
diff --git a/src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj b/src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj
index f4d7c73e6..5893d246b 100644
--- a/src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj
+++ b/src/Examples.FirstAutomappedProject/Examples.FirstAutomappedProject.csproj
@@ -13,8 +13,7 @@
-
-
+
diff --git a/src/Examples.FirstProject/Examples.FirstProject.csproj b/src/Examples.FirstProject/Examples.FirstProject.csproj
index a3268bdbb..db23c7d43 100644
--- a/src/Examples.FirstProject/Examples.FirstProject.csproj
+++ b/src/Examples.FirstProject/Examples.FirstProject.csproj
@@ -13,8 +13,7 @@
-
-
+
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.Testing/FluentNHibernate.Testing.csproj b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
index f92b18f39..805d86991 100644
--- a/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
+++ b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
@@ -26,7 +26,7 @@
-
+
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/FluentNHibernate.csproj b/src/FluentNHibernate/FluentNHibernate.csproj
index 089b069c4..ba4590cbb 100644
--- a/src/FluentNHibernate/FluentNHibernate.csproj
+++ b/src/FluentNHibernate/FluentNHibernate.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/src/FluentNHibernate/Mapping/ComponentMap.cs b/src/FluentNHibernate/Mapping/ComponentMap.cs
index 2b0e2cf8d..a5b6d9b6a 100644
--- a/src/FluentNHibernate/Mapping/ComponentMap.cs
+++ b/src/FluentNHibernate/Mapping/ComponentMap.cs
@@ -59,9 +59,7 @@ protected override ComponentMapping CreateComponentMappingRoot(AttributeStore st
ExternalComponentMapping IExternalComponentMappingProvider.GetComponentMapping()
{
- var mapping = (ExternalComponentMapping)CreateComponentMapping();
-
- return mapping.DeepClone();
+ return (ExternalComponentMapping) CreateComponentMapping();
}
Type IExternalComponentMappingProvider.Type
diff --git a/src/FluentNHibernate/Mapping/ElementPart.cs b/src/FluentNHibernate/Mapping/ElementPart.cs
index 56b93a15b..69acfa2c7 100644
--- a/src/FluentNHibernate/Mapping/ElementPart.cs
+++ b/src/FluentNHibernate/Mapping/ElementPart.cs
@@ -101,7 +101,7 @@ ElementMapping IElementMappingProvider.GetElementMapping()
foreach (var column in Columns)
{
column.MergeAttributes(columnAttributes);
- mapping.AddColumn(Layer.Defaults, column);
+ mapping.AddColumn(Layer.Defaults, column.Clone());
}
return mapping;
diff --git a/src/FluentNHibernate/Mapping/JoinedSubClassPart.cs b/src/FluentNHibernate/Mapping/JoinedSubClassPart.cs
index 7d985e02e..f916f1092 100644
--- a/src/FluentNHibernate/Mapping/JoinedSubClassPart.cs
+++ b/src/FluentNHibernate/Mapping/JoinedSubClassPart.cs
@@ -143,7 +143,7 @@ SubclassMapping ISubclassMappingProvider.GetSubclassMapping()
mapping.Set(x => x.Type, Layer.Defaults, typeof(TSubclass));
foreach (var column in columns)
- mapping.Key.AddColumn(Layer.Defaults, column);
+ mapping.Key.AddColumn(Layer.Defaults, column.Clone());
foreach (var property in providers.Properties)
mapping.AddProperty(property.GetPropertyMapping());
diff --git a/src/FluentNHibernate/Mapping/ManyToManyPart.cs b/src/FluentNHibernate/Mapping/ManyToManyPart.cs
index 508e0b2d6..5ef3e5d4a 100644
--- a/src/FluentNHibernate/Mapping/ManyToManyPart.cs
+++ b/src/FluentNHibernate/Mapping/ManyToManyPart.cs
@@ -370,7 +370,7 @@ protected override CollectionMapping GetCollectionMapping()
collection.Key.AddColumn(Layer.Defaults, new ColumnMapping(EntityType.Name + "_id"));
foreach (var column in parentKeyColumns)
- collection.Key.AddColumn(Layer.UserSupplied, column);
+ collection.Key.AddColumn(Layer.UserSupplied, column.Clone());
if (collection.Relationship != null)
{
@@ -379,7 +379,7 @@ protected override CollectionMapping GetCollectionMapping()
((ManyToManyMapping)collection.Relationship).AddColumn(Layer.Defaults, new ColumnMapping(typeof(TChild).Name + "_id"));
foreach (var column in childKeyColumns)
- ((ManyToManyMapping)collection.Relationship).AddColumn(Layer.UserSupplied, column);
+ ((ManyToManyMapping)collection.Relationship).AddColumn(Layer.UserSupplied, column.Clone());
}
// HACK: Index only on list and map - shouldn't have to do this!
diff --git a/src/FluentNHibernate/Mapping/OneToManyPart.cs b/src/FluentNHibernate/Mapping/OneToManyPart.cs
index cbeedbce2..a579350a0 100644
--- a/src/FluentNHibernate/Mapping/OneToManyPart.cs
+++ b/src/FluentNHibernate/Mapping/OneToManyPart.cs
@@ -198,7 +198,7 @@ protected override CollectionMapping GetCollectionMapping()
foreach (var column in keyColumns)
{
- collection.Key.AddColumn(Layer.UserSupplied, column);
+ collection.Key.AddColumn(Layer.UserSupplied, column.Clone());
}
// HACK: shouldn't have to do this!
diff --git a/src/FluentNHibernate/Mapping/PropertyPart.cs b/src/FluentNHibernate/Mapping/PropertyPart.cs
index 38b15779b..6bc1450c1 100644
--- a/src/FluentNHibernate/Mapping/PropertyPart.cs
+++ b/src/FluentNHibernate/Mapping/PropertyPart.cs
@@ -332,7 +332,7 @@ PropertyMapping IPropertyMappingProvider.GetPropertyMapping()
}
foreach (var column in columns)
- mapping.AddColumn(Layer.UserSupplied, column);
+ mapping.AddColumn(Layer.UserSupplied, column.Clone());
foreach (var column in mapping.Columns)
{
diff --git a/src/FluentNHibernate/Mapping/SubclassMap.cs b/src/FluentNHibernate/Mapping/SubclassMap.cs
index 4fd0f11dd..d37795c19 100644
--- a/src/FluentNHibernate/Mapping/SubclassMap.cs
+++ b/src/FluentNHibernate/Mapping/SubclassMap.cs
@@ -345,7 +345,7 @@ SubclassMapping IIndeterminateSubclassMappingProvider.GetSubclassMapping(Subclas
}
}
- return mapping.DeepClone();
+ return mapping;
}
Type IIndeterminateSubclassMappingProvider.EntityType
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;
}
diff --git a/src/FluentNHibernate/Utils/Extensions.cs b/src/FluentNHibernate/Utils/Extensions.cs
index 76cbd7e04..b21a1dcde 100644
--- a/src/FluentNHibernate/Utils/Extensions.cs
+++ b/src/FluentNHibernate/Utils/Extensions.cs
@@ -66,6 +66,7 @@ public static bool HasInterface(this Type type, Type interfaceType)
return type.GetInterfaces().Contains(interfaceType);
}
+ [Obsolete("Please do not use this method. It will be removed in a future version.")]
public static T DeepClone(this T obj)
{
using (var stream = new MemoryStream())