Skip to content

Commit fe17917

Browse files
committed
Merge remote-tracking branch 'origin/NH-4008' into NH-3807
2 parents 6b6371b + e4a332f commit fe17917

File tree

179 files changed

+1801
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1801
-535
lines changed

build-common/nhibernate-properties.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
33
<property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2008Dialect" overwrite="false"/>
44
<property name="nhibernate.command_timeout" value="444" overwrite="false"/>
5-
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.Sql2008ClientDriver" overwrite="false"/>
5+
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer" overwrite="false"/>
66
<property name="nhibernate.connection.connection_string" value="Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/>
77
</project>

build-common/teamcity-hibernate.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<property name="format_sql">true</property>
1616

1717
<!-- This is the System.Data.dll provider for MSSQL Server -->
18-
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property>
18+
<property name="connection.driver_class">NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</property>
1919
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
2020
<property name="connection.connection_string">Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI</property>
2121
<property name="show_sql">false</property>

default.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
<property name="bin-pack.tmpdir" value="${build.dir}/tmp-bin" />
139139
<property name="bin-pack.conf-template" value="${bin-pack.tmpdir}/Configuration_Templates" />
140140
<property name="bin-pack.required" value="${bin-pack.tmpdir}/Required_Bins" />
141+
<property name="bin-pack.drivers" value="${bin-pack.tmpdir}/Select_Single_Driver" />
141142
<property name="bin-pack.tests" value="${bin-pack.tmpdir}/Tests" />
142143

143144
<copy file="releasenotes.txt" todir="${bin-pack.tmpdir}"/>
@@ -169,7 +170,11 @@
169170
<include name="Remotion.Linq.EagerFetching.???" />
170171
</fileset>
171172
</copy>
172-
<!--Required Bins for lazy loading NHibernate.ByteCode.Castle.dll-->
173+
<copy todir="${bin-pack.drivers}">
174+
<fileset basedir="${bin.dir}">
175+
<include name="NHibernate.Driver.*.???" />
176+
</fileset>
177+
</copy>
173178
<!-- Tests -->
174179
<copy file="${bin.dir}/TestEmbeddedConfig.cfg.xml" todir="${bin-pack.tests}"/>
175180
<copy file="${bin.dir}/ABC.hbm.xml" todir="${bin-pack.tests}"/>

doc/reference/modules/configuration.xml

Lines changed: 77 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ var session = sessions.OpenSession(conn);
227227
take care of setting the <literal>IDriver</literal> using a sensible default. See the API
228228
documentation of the specific dialect for the defaults.
229229
</para>
230+
<para>
231+
Since NHibernate v5.1, drivers having a NuGet package for their data provider have a
232+
<literal>NHibernate.Driver</literal> dedicated assembly, which have to be referenced by your project.
233+
Those assemblies are also available as NuGet packages.
234+
If an obsolete driver is configured, NHibernate will issue a warning log when building the session
235+
factory.
236+
</para>
230237
</entry>
231238
</row>
232239
<row>
@@ -1186,9 +1193,13 @@ in the parameter binding.</programlisting>
11861193
<entry>Firebird</entry>
11871194
<entry><literal>NHibernate.Dialect.FirebirdDialect</literal></entry>
11881195
<entry>
1189-
Set <literal>driver_class</literal> to
1190-
<literal>NHibernate.Driver.FirebirdClientDriver</literal>
1191-
for Firebird ADO.NET provider 2.0.
1196+
Install NuGet package
1197+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.Firebird/">NHibernate.Driver.Firebird</ulink>
1198+
and set <literal>driver_class</literal> to
1199+
<literal>NHibernate.Driver.FirebirdDriver, NHibernate.Driver.Firebird</literal>
1200+
with a fallback on the built-in reflection based
1201+
<literal>NHibernate.Driver.FirebirdClientDriver</literal>.
1202+
Both use Firebird ADO.NET provider.
11921203
</entry>
11931204
</row>
11941205
<row>
@@ -1219,65 +1230,99 @@ in the parameter binding.</programlisting>
12191230
<row>
12201231
<entry>Microsoft SQL Server 7</entry>
12211232
<entry><literal>NHibernate.Dialect.MsSql7Dialect</literal></entry>
1222-
<entry></entry>
1233+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2000Dialect</literal>.</entry>
12231234
</row>
12241235
<row>
12251236
<entry>Microsoft SQL Server 2000</entry>
12261237
<entry><literal>NHibernate.Dialect.MsSql2000Dialect</literal></entry>
1227-
<entry></entry>
1238+
<entry>
1239+
Install NuGet package
1240+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer/">NHibernate.Driver.SqlServer</ulink>
1241+
and set <literal>driver_class</literal> to
1242+
<literal>NHibernate.Driver.SqlServer2000Driver, NHibernate.Driver.SqlServer</literal>
1243+
with a fallback on the built-in reflection based
1244+
<literal>NHibernate.Driver.SqlClientDriver</literal>.
1245+
Both use <literal>System.Data.SqlClient</literal>.
1246+
</entry>
12281247
</row>
12291248
<row>
12301249
<entry>Microsoft SQL Server 2005</entry>
12311250
<entry><literal>NHibernate.Dialect.MsSql2005Dialect</literal></entry>
1232-
<entry></entry>
1251+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2000Dialect</literal>.</entry>
12331252
</row>
12341253
<row>
12351254
<entry>Microsoft SQL Server 2008</entry>
12361255
<entry><literal>NHibernate.Dialect.MsSql2008Dialect</literal></entry>
1237-
<entry></entry>
1256+
<entry>
1257+
Install NuGet package
1258+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer/">NHibernate.Driver.SqlServer</ulink>
1259+
and set <literal>driver_class</literal> to
1260+
<literal>NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</literal>
1261+
with a fallback on the built-in reflection based
1262+
<literal>NHibernate.Driver.Sql2008ClientDriver</literal>.
1263+
Both use <literal>System.Data.SqlClient</literal>.
1264+
</entry>
12381265
</row>
12391266
<row>
12401267
<entry>Microsoft SQL Azure Server 2008</entry>
12411268
<entry><literal>NHibernate.Dialect.MsSqlAzure2008Dialect</literal></entry>
1242-
<entry></entry>
1269+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2008Dialect</literal>.</entry>
12431270
</row>
12441271
<row>
12451272
<entry>Microsoft SQL Server 2012</entry>
12461273
<entry><literal>NHibernate.Dialect.MsSql2012Dialect</literal></entry>
1247-
<entry></entry>
1274+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2008Dialect</literal>.</entry>
12481275
</row>
12491276
<row>
12501277
<entry>Microsoft SQL Server Compact Edition</entry>
12511278
<entry><literal>NHibernate.Dialect.MsSqlCeDialect</literal></entry>
1279+
<entry>
1280+
Install NuGet package
1281+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer.Compact/">NHibernate.Driver.SqlServer.Compact</ulink>
1282+
and set <literal>driver_class</literal> to
1283+
<literal>NHibernate.Driver.SqlServerCompactDriver, NHibernate.Driver.SqlServer.Compact</literal>
1284+
with a fallback on the built-in reflection based
1285+
<literal>NHibernate.Driver.SqlServerCeDriver</literal>.
1286+
Both use <literal>System.Data.SqlServerCe</literal>.
1287+
</entry>
12521288
</row>
12531289
<row>
12541290
<entry>Microsoft SQL Server Compact Edition 4.0</entry>
12551291
<entry><literal>NHibernate.Dialect.MsSqlCe40Dialect</literal></entry>
1292+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSqlCeDialect</literal>.</entry>
12561293
</row>
12571294
<row>
1258-
<entry>MySQL 3 or 4</entry>
1295+
<entry>MySQL 3 or 4</entry>
12591296
<entry><literal>NHibernate.Dialect.MySQLDialect</literal></entry>
1260-
<entry></entry>
1297+
<entry>
1298+
Install NuGet package
1299+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.MySql/">NHibernate.Driver.MySql</ulink>
1300+
and set <literal>driver_class</literal> to
1301+
<literal>NHibernate.Driver.MySqlDriver, NHibernate.Driver.MySql</literal>
1302+
with a fallback on the built-in reflection based
1303+
<literal>NHibernate.Driver.MySqlDataDriver</literal>.
1304+
Both use <literal>MySql.Data</literal>.
1305+
</entry>
12611306
</row>
12621307
<row>
12631308
<entry>MySQL 5</entry>
12641309
<entry><literal>NHibernate.Dialect.MySQL5Dialect</literal></entry>
1265-
<entry></entry>
1310+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
12661311
</row>
12671312
<row>
12681313
<entry>MySQL 5 Inno DB</entry>
12691314
<entry><literal>NHibernate.Dialect.MySQL5InnoDBDialect</literal></entry>
1270-
<entry></entry>
1315+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
12711316
</row>
12721317
<row>
12731318
<entry>MySQL 5.5</entry>
12741319
<entry><literal>NHibernate.Dialect.MySQL55Dialect</literal></entry>
1275-
<entry></entry>
1320+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
12761321
</row>
12771322
<row>
12781323
<entry>MySQL 5.5 Inno DB</entry>
12791324
<entry><literal>NHibernate.Dialect.MySQL55InnoDBDialect</literal></entry>
1280-
<entry></entry>
1325+
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
12811326
</row>
12821327
<row>
12831328
<entry>Oracle</entry>
@@ -1299,15 +1344,17 @@ in the parameter binding.</programlisting>
12991344
<entry><literal>NHibernate.Dialect.Oracle12cDialect</literal></entry>
13001345
<entry></entry>
13011346
</row>
1302-
<row>
1303-
<entry>PostgreSQL</entry>
1304-
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
1305-
<entry></entry>
1306-
</row>
13071347
<row>
13081348
<entry>PostgreSQL</entry>
13091349
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
13101350
<entry>
1351+
Install NuGet package
1352+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.PostgreSql/">NHibernate.Driver.PostgreSql</ulink>
1353+
and set <literal>driver_class</literal> to
1354+
<literal>NHibernate.Driver.PostgreSqlDriver, NHibernate.Driver.PostgreSql</literal>
1355+
with a fallback on the built-in reflection based
1356+
<literal>NHibernate.Driver.NpgsqlDriver</literal>.
1357+
Both use <literal>Npgsql</literal>.
13111358
</entry>
13121359
</row>
13131360
<row>
@@ -1316,6 +1363,7 @@ in the parameter binding.</programlisting>
13161363
<entry>
13171364
This dialect supports <literal>FOR UPDATE NOWAIT</literal>
13181365
available in PostgreSQL 8.1.
1366+
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
13191367
</entry>
13201368
</row>
13211369
<row>
@@ -1325,22 +1373,28 @@ in the parameter binding.</programlisting>
13251373
This dialect supports <literal>IF EXISTS</literal> keyword in
13261374
<literal>DROP TABLE</literal> and <literal>DROP SEQUENCE</literal>
13271375
available in PostgreSQL 8.2.
1376+
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
13281377
</entry>
13291378
</row>
13301379
<row>
13311380
<entry>PostgreSQL 8.3</entry>
13321381
<entry><literal>NHibernate.Dialect.PostgreSQL83Dialect</literal></entry>
13331382
<entry>
13341383
This dialect supports <literal>XML</literal> type.
1384+
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
13351385
</entry>
13361386
</row>
13371387
<row>
13381388
<entry>SQLite</entry>
13391389
<entry><literal>NHibernate.Dialect.SQLiteDialect</literal></entry>
13401390
<entry>
1341-
Set <literal>driver_class</literal> to
1342-
<literal>NHibernate.Driver.SQLite20Driver</literal>
1343-
for System.Data.SQLite provider for .NET 2.0.
1391+
Install NuGet package
1392+
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SQLite/">NHibernate.Driver.SQLite</ulink>
1393+
and set <literal>driver_class</literal> to
1394+
<literal>NHibernate.Driver.SQLiteDriver, NHibernate.Driver.SQLite</literal>
1395+
with a fallback on the built-in reflection based
1396+
<literal>NHibernate.Driver.SQLite20Driver</literal>.
1397+
Both use <literal>System.Data.SQLite</literal>.
13441398
<para>
13451399
Due to
13461400
<ulink url="https://system.data.sqlite.org/index.html/tktview/44a0955ea344a777ffdbcc077831e1adc8b77a36">the

src/NHibernate.Config.Templates/FireBird.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ for your own use before compile tests in VisualStudio.
1616
-->
1717
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
1818
<session-factory name="NHibernate.Test">
19-
<property name="connection.driver_class">NHibernate.Driver.FirebirdClientDriver</property>
19+
<property name="connection.driver_class">NHibernate.Driver.FirebirdDriver, NHibernate.Driver.Firebird</property>
2020
<property name="connection.connection_string">
2121
DataSource=localhost;
2222
Database=nhibernate;

src/NHibernate.Config.Templates/MSSQL.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ for your own use before compile tests in VisualStudio.
77
<!-- This is the System.Data.dll provider for SQL Server -->
88
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
99
<session-factory name="NHibernate.Test">
10-
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property>
10+
<property name="connection.driver_class">NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</property>
1111
<property name="connection.connection_string">
1212
Server=(local);initial catalog=nhibernate;Integrated Security=SSPI
1313
</property>

src/NHibernate.Config.Templates/MySql.cfg.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ for your own use before compile tests in VisualStudio.
66
-->
77
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
88
<session-factory name="NHibernate.Test">
9-
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
9+
<property name="connection.driver_class">NHibernate.Driver.MySqlDriver, NHibernate.Driver.MySql</property>
1010
<property name="connection.connection_string">
1111
Database=nhibernate;Data Source=localhost;User Id=nhibernate;Password=;
1212
Protocol=memory;Old Guids=True;
1313
</property>
1414
<property name="dialect">NHibernate.Dialect.MySQL5Dialect</property>
1515
</session-factory>
16-
</hibernate-configuration>
16+
</hibernate-configuration>

src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ for your own use before compile tests in VisualStudio.
77
<!-- This is the System.Data.OracleClient.dll provider for Oracle from MS -->
88
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
99
<session-factory name="NHibernate.Test">
10-
<property name="connection.driver_class">NHibernate.Driver.OracleManagedDataClientDriver</property>
10+
<property name="connection.driver_class">NHibernate.Driver.OracleManagedDriver, NHibernate.Driver.Oracle.Managed</property>
1111
<property name="connection.connection_string">
1212
User ID=nhibernate;Password=nhibernate;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))
1313
</property>

src/NHibernate.Config.Templates/PostgreSQL.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ for your own use before compile tests in VisualStudio.
66
-->
77
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
88
<session-factory name="NHibernate.Test">
9-
<property name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</property>
9+
<property name="connection.driver_class">NHibernate.Driver.PostgreSqlDriver, NHibernate.Driver.PostgreSql</property>
1010
<property name="connection.connection_string">
1111
Server=localhost;Database=nhibernate;User ID=nhibernate;Password=nhibernate;Enlist=true;
1212
</property>

src/NHibernate.Config.Templates/SQLite.cfg.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ for your own use before compile tests in VisualStudio.
66
-->
77
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
88
<session-factory name="NHibernate.Test">
9-
<property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
9+
<property name="connection.driver_class">NHibernate.Driver.SQLiteDriver, NHibernate.Driver.SQLite</property>
1010
<!-- DateTimeFormatString allows to prevent storing the fact that written date was having kind UTC,
1111
which dodges the undesirable time conversion to local done on reads by System.Data.SQLite.
1212
See https://system.data.sqlite.org/index.html/tktview/44a0955ea344a777ffdbcc077831e1adc8b77a36

0 commit comments

Comments
 (0)