Skip to content

Commit 5a1279d

Browse files
committed
Merge branch 'master' into add-many-to-many-with-filter-test
2 parents ee1921a + 86e05bf commit 5a1279d

File tree

77 files changed

+2372
-345
lines changed

Some content is hidden

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

77 files changed

+2372
-345
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ dotnet_diagnostic.NUnit2031.severity = suggestion
2727
dotnet_diagnostic.NUnit2049.severity = suggestion
2828
# The SameAs constraint always fails on value types as the actual and the expected value cannot be the same reference
2929
dotnet_diagnostic.NUnit2040.severity = suggestion
30+
dotnet_diagnostic.CA1849.severity = error
31+
dotnet_diagnostic.CA2007.severity = error
32+
dotnet_code_quality.CA2007.output_kind = DynamicallyLinkedLibrary
3033

3134
[*.xsd]
3235
indent_style = tab

.github/workflows/GenerateAsyncCode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
ref: ${{ github.event.pull_request.head.ref }}
1919
repository: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/NetCoreTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
DB_INIT: |
1717
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress mcr.microsoft.com/mssql/server:2019-latest;
1818
- DB: SqlServer2008-MicrosoftDataSqlClientDriver
19-
CONNECTION_STRING: "Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
19+
CONNECTION_STRING: "Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;TrustServerCertificate=true;"
2020
OS: ubuntu-latest
2121
DB_INIT: |
2222
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress mcr.microsoft.com/mssql/server:2019-latest;
@@ -69,7 +69,7 @@ jobs:
6969
dotnet-version: 8.0.x
7070

7171
- name: Checkout
72-
uses: actions/checkout@v4
72+
uses: actions/checkout@v5
7373
with:
7474
show-progress: false
7575

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
- DB: SqlServer2008
66
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
77
- DB: SqlServer2008-MicrosoftDataSqlClientDriver
8-
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;
8+
CONNECTION_STRING: Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;TrustServerCertificate=true;
99
- DB: Firebird
1010
- DB: Firebird4
1111
- DB: MySQL

build-common/NHibernate.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
<PublishRepositoryUrl>true</PublishRepositoryUrl>
4848
<IncludeSymbols>true</IncludeSymbols>
4949
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
50+
<PublicKey>
51+
002400000480000094000000060200000024000052534131000400000100010097dcf11f130a2a2ac4df89be27a41d403258c943574cd324c819f20798506b9ffadf8870efae2c40073b6cd97076e88a3c80dfe5011d259de719e85d68d1673720f6a36476a3a25b6a6277dd8bc3ce394f5c2a7b04bda884edc8d4c9d6e1d376b509ba68ae64031cab45b0b1a4ea95933258722a3a4ee98f1c6b4c8571e3b8a5
52+
</PublicKey>
5053
</PropertyGroup>
5154
<ItemGroup>
5255
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />

doc/reference/modules/configuration.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,11 @@ in the parameter binding.</programlisting>
16061606
<entry><literal>NHibernate.Dialect.SybaseASE15Dialect</literal></entry>
16071607
<entry></entry>
16081608
</row>
1609+
<row>
1610+
<entry>Sybase Adaptive Server Enterprise 16</entry>
1611+
<entry><literal>NHibernate.Dialect.SybaseASE16Dialect</literal></entry>
1612+
<entry></entry>
1613+
</row>
16091614
<row>
16101615
<entry>Sybase SQL Anywhere 10</entry>
16111616
<entry><literal>NHibernate.Dialect.SybaseSQLAnywhere10Dialect</literal></entry>

releasenotes.txt

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
Build 5.5.2
1+
Build 5.5.3
2+
=============================
3+
4+
Release notes - NHibernate - Version 5.5.3
5+
6+
2 issues were resolved in this release.
7+
8+
** Task
9+
10+
* #3692 Release 5.5.3
11+
* #3691 Merge 5.4.10 into 5.5.x
12+
13+
14+
Build 5.5.2
215
=============================
316

417
Release notes - NHibernate - Version 5.5.2
@@ -122,6 +135,23 @@ Release notes - NHibernate - Version 5.5.0
122135
* #3412 Revive hql ParsingFixture
123136

124137

138+
Build 5.4.10
139+
=============================
140+
141+
Release notes - NHibernate - Version 5.4.10
142+
143+
3 issues were resolved in this release.
144+
145+
** Bug
146+
147+
* #3609 Fitering with a subquery on a many-to-one with property-ref generates invalid SQL
148+
* #3607 Invalid ByCode serialization to XML for OneToOne mappings
149+
150+
** Task
151+
152+
* #3688 Release 5.4.10
153+
154+
125155
Build 5.4.9
126156
=============================
127157

src/NHibernate.DomainModel/NHibernate.DomainModel.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<IsTestProject>true</IsTestProject>
77
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
88
</PropertyGroup>
9+
<PropertyGroup>
10+
<SignAssembly>true</SignAssembly>
11+
<AssemblyOriginatorKeyFile>..\NHibernate.snk</AssemblyOriginatorKeyFile>
12+
</PropertyGroup>
913
<ItemGroup>
1014
<None Remove="**\*.hbm.xml" />
1115
</ItemGroup>

src/NHibernate.Test/Ado/BatcherFixture.cs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@
44

55
namespace NHibernate.Test.Ado
66
{
7-
[TestFixture]
7+
#if NET6_0_OR_GREATER
8+
[TestFixture(true)]
9+
#endif
10+
[TestFixture(false)]
811
public class BatcherFixture: TestCase
912
{
13+
private readonly bool _useDbBatch;
14+
15+
public BatcherFixture(bool useDbBatch)
16+
{
17+
_useDbBatch = useDbBatch;
18+
}
1019
protected override string MappingsAssembly
1120
{
1221
get { return "NHibernate.Test"; }
@@ -22,10 +31,22 @@ protected override void Configure(Configuration configuration)
2231
configuration.SetProperty(Environment.FormatSql, "true");
2332
configuration.SetProperty(Environment.GenerateStatistics, "true");
2433
configuration.SetProperty(Environment.BatchSize, "10");
34+
#if NET6_0_OR_GREATER
35+
if (_useDbBatch)
36+
{
37+
configuration.SetProperty(Environment.BatchStrategy, typeof(DbBatchBatcherFactory).AssemblyQualifiedName);
38+
}
39+
#endif
2540
}
2641

2742
protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory)
2843
{
44+
#if NET6_0_OR_GREATER
45+
if (_useDbBatch)
46+
{
47+
return factory.Settings.BatcherFactory is DbBatchBatcherFactory && factory.Settings.ConnectionProvider.Driver is Driver.DriverBase driverBase && driverBase.CanCreateBatch;
48+
}
49+
#endif
2950
return !(factory.Settings.BatcherFactory is NonBatchingBatcherFactory);
3051
}
3152

@@ -129,20 +150,25 @@ public void SqlClientOneRoundTripForUpdateAndInsert()
129150
Cleanup();
130151
}
131152

132-
[Test, NetFxOnly]
153+
[Test]
133154
[Description("SqlClient: The batcher log output should be formatted")]
134155
public void BatchedoutputShouldBeFormatted()
135156
{
136157
#if NETFX
137158
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
138159
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
160+
#elif NET6_0_OR_GREATER
161+
if (Sfi.Settings.BatcherFactory is DbBatchBatcherFactory == false)
162+
Assert.Ignore("This test is for DbBatchBatcherFactory only");
163+
#else
164+
Assert.Ignore("This test is for NETFX and NET6_0_OR_GREATER only");
139165
#endif
140166

141167
using (var sqlLog = new SqlLogSpy())
142168
{
143169
FillDb();
144170
var log = sqlLog.GetWholeLog();
145-
Assert.IsTrue(log.Contains("INSERT \n INTO"));
171+
Assert.That(log, Does.Contain("INSERT \n INTO").IgnoreCase);
146172
}
147173

148174
Cleanup();
@@ -213,7 +239,7 @@ public void AbstractBatcherLog()
213239
foreach (var loggingEvent in sl.Appender.GetEvents())
214240
{
215241
string message = loggingEvent.RenderedMessage;
216-
if(message.ToLowerInvariant().Contains("insert"))
242+
if(message.Contains("insert"))
217243
{
218244
Assert.That(message, Does.Contain("batch").IgnoreCase);
219245
}

src/NHibernate.Test/Async/Ado/BatcherFixture.cs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@ namespace NHibernate.Test.Ado
1616
{
1717
using System.Threading.Tasks;
1818
using System.Threading;
19-
[TestFixture]
19+
#if NET6_0_OR_GREATER
20+
[TestFixture(true)]
21+
#endif
22+
[TestFixture(false)]
2023
public class BatcherFixtureAsync: TestCase
2124
{
25+
private readonly bool _useDbBatch;
26+
27+
public BatcherFixtureAsync(bool useDbBatch)
28+
{
29+
_useDbBatch = useDbBatch;
30+
}
2231
protected override string MappingsAssembly
2332
{
2433
get { return "NHibernate.Test"; }
@@ -34,10 +43,22 @@ protected override void Configure(Configuration configuration)
3443
configuration.SetProperty(Environment.FormatSql, "true");
3544
configuration.SetProperty(Environment.GenerateStatistics, "true");
3645
configuration.SetProperty(Environment.BatchSize, "10");
46+
#if NET6_0_OR_GREATER
47+
if (_useDbBatch)
48+
{
49+
configuration.SetProperty(Environment.BatchStrategy, typeof(DbBatchBatcherFactory).AssemblyQualifiedName);
50+
}
51+
#endif
3752
}
3853

3954
protected override bool AppliesTo(Engine.ISessionFactoryImplementor factory)
4055
{
56+
#if NET6_0_OR_GREATER
57+
if (_useDbBatch)
58+
{
59+
return factory.Settings.BatcherFactory is DbBatchBatcherFactory && factory.Settings.ConnectionProvider.Driver is Driver.DriverBase driverBase && driverBase.CanCreateBatch;
60+
}
61+
#endif
4162
return !(factory.Settings.BatcherFactory is NonBatchingBatcherFactory);
4263
}
4364

@@ -101,20 +122,25 @@ public async Task OneRoundTripUpdateAsync()
101122
await (CleanupAsync());
102123
}
103124

104-
[Test, NetFxOnly]
125+
[Test]
105126
[Description("SqlClient: The batcher log output should be formatted")]
106127
public async Task BatchedoutputShouldBeFormattedAsync()
107128
{
108129
#if NETFX
109130
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
110131
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
132+
#elif NET6_0_OR_GREATER
133+
if (Sfi.Settings.BatcherFactory is DbBatchBatcherFactory == false)
134+
Assert.Ignore("This test is for DbBatchBatcherFactory only");
135+
#else
136+
Assert.Ignore("This test is for NETFX and NET6_0_OR_GREATER only");
111137
#endif
112138

113139
using (var sqlLog = new SqlLogSpy())
114140
{
115141
await (FillDbAsync());
116142
var log = sqlLog.GetWholeLog();
117-
Assert.IsTrue(log.Contains("INSERT \n INTO"));
143+
Assert.That(log, Does.Contain("INSERT \n INTO").IgnoreCase);
118144
}
119145

120146
await (CleanupAsync());
@@ -185,7 +211,7 @@ public async Task AbstractBatcherLogAsync()
185211
foreach (var loggingEvent in sl.Appender.GetEvents())
186212
{
187213
string message = loggingEvent.RenderedMessage;
188-
if(message.ToLowerInvariant().Contains("insert"))
214+
if(message.Contains("insert"))
189215
{
190216
Assert.That(message, Does.Contain("batch").IgnoreCase);
191217
}

0 commit comments

Comments
 (0)