Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 5.4.7 in master #3460

Merged
merged 6 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ before_test:
Pop-Location
}
'MySQL' {
Start-Service 'MySQL57'
Start-Service 'MySQL80'
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
$env:MYSQL_PWD = 'Password12!'
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
}
'Odbc' { Start-Service 'MSSQL$SQL2017' }
'PostgreSQL' {
Expand Down
32 changes: 31 additions & 1 deletion releasenotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
Build 5.4.6
Build 5.4.7
=============================

Release notes - NHibernate - Version 5.4.7

3 issues were resolved in this release.

** Task

* #3459 Release 5.4.7
* #3458 Merge 5.3.20 into 5.4.x
* #3453 Migrate appveyor build to MySql 8


Build 5.4.6
=============================

Release notes - NHibernate - Version 5.4.6
Expand Down Expand Up @@ -311,6 +325,22 @@ Release notes - NHibernate - Version 5.4.0
* #2242 Test case for NH-3972 - SQL error when selecting a column of a subclass when sibling classes have a column of the same name


Build 5.3.20
=============================

Release notes - NHibernate - Version 5.3.20

2 issues were resolved in this release.

** Bug

* #3438 DB2/400: ArgumentException Column 'SQL_TYPE_NAME' does not belong to table DataTypes

** Task

* #3454 Release 5.3.20


Build 5.3.19
=============================

Expand Down
8 changes: 7 additions & 1 deletion src/NHibernate.Test/Async/Linq/MethodCallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public async Task CanExecuteCountWithOrderByArgumentsAsync()
public async Task CanSelectPropertiesIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Name, u.InvalidLoginAttempts})
.FirstAsync());

Expand All @@ -71,6 +72,7 @@ public async Task CanSelectPropertiesIntoObjectArrayAsync()
public async Task CanSelectComponentsIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Component, u.Component.OtherComponent})
.FirstAsync());

Expand Down Expand Up @@ -106,6 +108,7 @@ public async Task CanSelectConstantsIntoObjectArrayAsync()
const string name = "Julian";

var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, pi, name, DateTime.MinValue})
.FirstAsync());

Expand All @@ -119,6 +122,7 @@ public async Task CanSelectConstantsIntoObjectArrayAsync()
public async Task CanSelectPropertiesFromAssociationsIntoObjectArrayAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Role.Name, u.Role.Entity.Output})
.FirstAsync());

Expand All @@ -131,6 +135,7 @@ public async Task CanSelectPropertiesFromAssociationsIntoObjectArrayAsync()
public async Task CanSelectPropertiesIntoObjectArrayInPropertyAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new object[] { u.Id, u.Name, new object[u.Id] } })
.FirstAsync());

Expand All @@ -144,6 +149,7 @@ public async Task CanSelectPropertiesIntoObjectArrayInPropertyAsync()
public async Task CanSelectPropertiesIntoPropertyListInPropertyAsync()
{
var result = await (db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new List<object> { u.Id, u.Name, new object[u.Id] } })
.FirstAsync());

Expand All @@ -156,7 +162,7 @@ public async Task CanSelectPropertiesIntoPropertyListInPropertyAsync()
[Test, Description("NH-2744")]
public async Task CanSelectPropertiesIntoNestedObjectArraysAsync()
{
var query = db.Users.Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var query = db.Users.OrderBy(u => u.Id).Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var result = await (query.FirstAsync());

Assert.That(result.Length, Is.EqualTo(2));
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/Extralazy/UserGroup.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
assembly="NHibernate.Test"
namespace="NHibernate.Test.Extralazy">

<class name="Group" table="groups">
<class name="Group" table="`groups`">
<id name="Name"/>
<map name="Users" cascade="persist" table="group_user" lazy="extra">
<key column="groupName"/>
Expand Down
8 changes: 7 additions & 1 deletion src/NHibernate.Test/Linq/MethodCallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void CanExecuteCountWithOrderByArguments()
public void CanSelectPropertiesIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Name, u.InvalidLoginAttempts})
.First();

Expand All @@ -59,6 +60,7 @@ public void CanSelectPropertiesIntoObjectArray()
public void CanSelectComponentsIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Component, u.Component.OtherComponent})
.First();

Expand Down Expand Up @@ -94,6 +96,7 @@ public void CanSelectConstantsIntoObjectArray()
const string name = "Julian";

var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, pi, name, DateTime.MinValue})
.First();

Expand All @@ -107,6 +110,7 @@ public void CanSelectConstantsIntoObjectArray()
public void CanSelectPropertiesFromAssociationsIntoObjectArray()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new object[] {u.Id, u.Role.Name, u.Role.Entity.Output})
.First();

Expand All @@ -119,6 +123,7 @@ public void CanSelectPropertiesFromAssociationsIntoObjectArray()
public void CanSelectPropertiesIntoObjectArrayInProperty()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new object[] { u.Id, u.Name, new object[u.Id] } })
.First();

Expand All @@ -132,6 +137,7 @@ public void CanSelectPropertiesIntoObjectArrayInProperty()
public void CanSelectPropertiesIntoPropertyListInProperty()
{
var result = db.Users
.OrderBy(u => u.Id)
.Select(u => new { Cells = new List<object> { u.Id, u.Name, new object[u.Id] } })
.First();

Expand All @@ -144,7 +150,7 @@ public void CanSelectPropertiesIntoPropertyListInProperty()
[Test, Description("NH-2744")]
public void CanSelectPropertiesIntoNestedObjectArrays()
{
var query = db.Users.Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var query = db.Users.OrderBy(u => u.Id).Select(u => new object[] {"Root", new object[] {"Sub1", u.Name, new object[] {"Sub2", u.Name}}});
var result = query.First();

Assert.That(result.Length, Is.EqualTo(2));
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2113/Mappings.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<property name="Name" />
</class>

<class name="Group" table="Groups">
<class name="Group" table="`Groups`">
<id name="Id" column="GroupID">
<generator class="increment"/>
</id>
Expand Down
4 changes: 2 additions & 2 deletions src/NHibernate.Test/NHSpecificTest/NH2907/Mappings.hbm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<property name="Name" type="string"/>
</class>

<class name="Group" table="groups">
<class name="Group" table="`groups`">
<id name="Id">
<column name="GroupId"/>
<generator class="native"/>
</id>
<property name="Name" type="string"/>
</class>
</hibernate-mapping>
</hibernate-mapping>
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHibernate.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="9.1.1" />
<PackageReference Include="Npgsql" Version="7.0.4" />
<PackageReference Include="MySql.Data" Version="8.0.27" />
<PackageReference Include="MySql.Data" Version="8.0.30" />
</ItemGroup>
<ItemGroup Condition="$(NhNetFx)">
<Reference Include="System.Configuration" />
Expand Down
14 changes: 11 additions & 3 deletions src/NHibernate/Dialect/DB2400Dialect.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using NHibernate.Cfg;
using System;
using System.Data.Common;
using NHibernate.Dialect.Schema;
using NHibernate.SqlCommand;

namespace NHibernate.Dialect
Expand All @@ -23,7 +25,13 @@ public class DB2400Dialect : DB2Dialect
{
public DB2400Dialect()
{
DefaultProperties[Environment.ConnectionDriver] = "NHibernate.Driver.DB2400Driver";
DefaultProperties[Cfg.Environment.ConnectionDriver] = "NHibernate.Driver.DB2400Driver";
}

public override IDataBaseSchema GetDataBaseSchema(DbConnection connection)
{
// The DB2 implementation is not valid for DB2400.
throw new NotSupportedException();
}

public override bool SupportsSequences
Expand Down Expand Up @@ -61,4 +69,4 @@ public override bool SupportsVariableLimit
get { return false; }
}
}
}
}
Loading