Skip to content

Commit 0398d47

Browse files
committed
2 parents efaaa70 + 90d50c0 commit 0398d47

File tree

335 files changed

+11306
-1396
lines changed

Some content is hidden

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

335 files changed

+11306
-1396
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"csharpasyncgenerator.tool": {
6-
"version": "0.20.1",
6+
"version": "0.21.1",
77
"commands": [
88
"async-generator"
99
]
@@ -15,4 +15,4 @@
1515
]
1616
}
1717
}
18-
}
18+
}

.deepsource.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ version = 1
33
test_patterns = ["src/NHibernate.Test/**"]
44

55
exclude_patterns = [
6+
"src/NHibernate/**/*.generated.cs",
67
"src/NHibernate/Async/**/*.cs",
78
"src/NHibernate.DomainModel/Async/**/*.cs",
89
"src/NHibernate.Test/Async/**/*.cs"
910
]
1011

1112
[[analyzers]]
12-
name = "csharp"
13-
enabled = true
13+
name = "csharp"

.github/renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"Oracle.ManagedDataAccess"
3636
],
3737
"groupName": "Oracle.ManagedDataAccess"
38+
},
39+
{
40+
"matchPackagePrefixes": [
41+
"NHibernate.Caches"
42+
],
43+
"groupName": "NHibernate.Caches"
3844
}
3945
]
4046
}

.github/workflows/GenerateAsyncCode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
token: ${{ secrets.NHIBERNATE_BOT_TOKEN }}
2020

2121
- name: Setup .NET
22-
uses: actions/setup-dotnet@v2
22+
uses: actions/setup-dotnet@v3
2323
with:
2424
dotnet-version: 6.0.x
2525

.github/workflows/NetCoreTests.yml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,29 @@ jobs:
1010
include:
1111
- DB: SqlServer2008
1212
CONNECTION_STRING: "Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
13+
DB_INIT: |
14+
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;
1315
- DB: PostgreSQL
1416
CONNECTION_STRING: "Host=localhost;Username=nhibernate;Password=nhibernate;Database=nhibernate;Enlist=true;"
17+
DB_INIT: |
18+
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
1519
- DB: Firebird
1620
CONNECTION_STRING: "DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
21+
DB_INIT: |
22+
docker run --name firebird -e EnableWireCrypt=true -e FIREBIRD_USER=nhibernate -e FIREBIRD_PASSWORD=nhibernate -e ISC_PASSWORD=nhibernate -e FIREBIRD_DATABASE=nhibernate -p 3050:3050 -d jacobalberty/firebird:v3.0
23+
- DB: Firebird4
24+
CONNECTION_STRING: "DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
25+
DB_INIT: |
26+
docker run --name firebird -e EnableWireCrypt=true -e FIREBIRD_USER=nhibernate -e FIREBIRD_PASSWORD=nhibernate -e ISC_PASSWORD=nhibernate -e FIREBIRD_DATABASE=nhibernate -p 3050:3050 -d jacobalberty/firebird:v4.0
1727
- DB: MySQL
1828
CONNECTION_STRING: "Server=localhost;Uid=root;Password=nhibernate;Database=nhibernate;Old Guids=True;SslMode=none;"
29+
DB_INIT: |
30+
sudo service mysql stop
31+
docker run --name mysql -e MYSQL_ROOT_PASSWORD=nhibernate -e MYSQL_USER=nhibernate -e MYSQL_PASSWORD=nhibernate -e MYSQL_DATABASE=nhibernate -p 3306:3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -d mysql:5.7 mysqld --lower_case_table_names=1 --character-set-server=utf8 --collation-server=utf8_general_ci
1932
- DB: Oracle
2033
CONNECTION_STRING: "User ID=nhibernate;Password=nhibernate;Metadata Pooling=false;Self Tuning=false;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XEPDB1)))"
34+
DB_INIT: |
35+
docker run -d -p 1521:1521 -e APP_USER=nhibernate -e APP_USER_PASSWORD=nhibernate -e ORACLE_PASSWORD=nhibernate gvenzl/oracle-xe:21-slim
2136
- DB: SQLite
2237
runs-on: ubuntu-latest
2338
continue-on-error: ${{matrix.ALLOW_FAILURE == true}}
@@ -26,35 +41,11 @@ jobs:
2641
name: ${{matrix.DB}}
2742

2843
steps:
29-
- name: Set up SqlServer
30-
if: matrix.DB == 'SqlServer2008'
31-
run: |
32-
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;
33-
34-
- name: Set up MySQL
35-
if: matrix.DB == 'MySQL'
36-
run: |
37-
sudo service mysql stop
38-
docker run --name mysql -e MYSQL_ROOT_PASSWORD=nhibernate -e MYSQL_USER=nhibernate -e MYSQL_PASSWORD=nhibernate -e MYSQL_DATABASE=nhibernate -p 3306:3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -d mysql:5.7 mysqld --lower_case_table_names=1 --character-set-server=utf8 --collation-server=utf8_general_ci
39-
40-
- name: Set up PostgreSQL
41-
if: matrix.DB == 'PostgreSQL'
42-
run: |
43-
docker run -d -e POSTGRES_USER=nhibernate -e POSTGRES_PASSWORD=nhibernate -e POSTGRES_DB=nhibernate -p 5432:5432 postgres:13
44-
45-
- name: Set up Firebird
46-
if: matrix.DB == 'Firebird'
47-
run: |
48-
docker run --name firebird -e EnableWireCrypt=true -e FIREBIRD_USER=nhibernate -e FIREBIRD_PASSWORD=nhibernate -e ISC_PASSWORD=nhibernate -e FIREBIRD_DATABASE=nhibernate -p 3050:3050 -d jacobalberty/firebird:v3.0
49-
50-
- name: Set up Oracle
51-
if: matrix.DB == 'Oracle'
52-
run: |
53-
docker run -d -p 1521:1521 -e APP_USER=nhibernate -e APP_USER_PASSWORD=nhibernate -e ORACLE_PASSWORD=nhibernate gvenzl/oracle-xe:21-slim
54-
44+
- name: Set up ${{matrix.DB}}
45+
run: ${{matrix.DB_INIT}}
5546
- uses: actions/checkout@v3
5647
- name: Setup .NET
57-
uses: actions/setup-dotnet@v2
48+
uses: actions/setup-dotnet@v3
5849
with:
5950
dotnet-version: 6.0.x
6051

GitReleaseManager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ issue-labels-exclude:
1313
- "r: Obsolete"
1414
- "r: Rejected"
1515
- "r: Replaced"
16+
- "r: Reverted"
1617
- "t: Fix"
1718
issue-labels-alias:
1819
- name: "t: Bug"

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Nightly Development Builds
2626
--------------------------
2727

2828
The quickest way to get the latest development build of NHibernate is to add it to your project using
29-
NuGet from MyGet feed (<https://www.myget.org/gallery/nhibernate>).
29+
NuGet from Cloudsmith feed (<https://cloudsmith.io/~nhibernate/repos/nhibernate-core/packages/>).
3030

3131
In order to make life a little bit easier you can register the package source in the NuGet.Config
3232
file in the top folder of your project, similar to the following.
@@ -35,11 +35,18 @@ file in the top folder of your project, similar to the following.
3535
<?xml version="1.0" encoding="utf-8"?>
3636
<configuration>
3737
<packageSources>
38-
<add key="NHibernateDevBuilds" value="https://www.myget.org/F/nhibernate/api/v3/index.json" />
38+
<add key="NHibernateDevBuilds" value="https://nuget.cloudsmith.io/nhibernate/nhibernate-core/v3/index.json" />
3939
</packageSources>
4040
</configuration>
4141
```
4242

43+
Package repository hosting is graciously provided by [Cloudsmith](https://cloudsmith.com).
44+
Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that
45+
enables your organization to create, store and share packages in any format, to any place, with total
46+
confidence.
47+
48+
[![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat-square)](https://cloudsmith.com)
49+
4350
Community Forums
4451
----------------
4552

ReleaseProcedure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ These are the tasks typically needed to create an official NHibernate release.
33
* In GitHub, make sure no open issues have milestone set to the release
44
that is about to happen (as these will show in the milestone).
55

6-
* Restore local dotnet tools: `dotnet tool restore`
6+
* From inside nhibernate-core folder, restore local dotnet tools: `dotnet tool restore`
77

88
* Create a draft release in Github with GitReleaseManager. For example:
99

appveyor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ environment:
77
- DB: PostgreSQL
88
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
99
- DB: Firebird
10+
- DB: Firebird4
1011
- DB: MySQL
1112
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;SslMode=none;CharSet=utf8;
1213
- DB: SQLite
@@ -38,6 +39,27 @@ before_test:
3839
.\firebird.exe -a
3940
Pop-Location
4041
}
42+
'Firebird4' {
43+
$FireBirdPath = 'C:\firebird'
44+
# Install Firebird
45+
New-Item -ItemType Directory -Force $FireBirdPath > $null
46+
Push-Location $FireBirdPath
47+
Invoke-WebRequest 'https://github.com/FirebirdSQL/firebird/releases/download/v4.0.2/Firebird-4.0.2.2816-0-x64.zip' -OutFile firebird.zip
48+
Unblock-File firebird.zip
49+
7z x firebird.zip
50+
New-Item -ItemType Directory -Force Data
51+
# Declare nhibernate db
52+
Add-Content -Path '.\databases.conf' -Value "`r`nnhibernate = $FireBirdPath\Data\nhibernate.fdb"
53+
# Minimal db settings
54+
Add-Content -Path '.\firebird.conf' -Value "`r`nAuthServer = Srp`r`nAuthClient = Srp`r`nUserManager = Srp`r`nWireCrypt = Enabled"
55+
# Create SYSDBA account
56+
New-Item SYSDBA.sql -Type File
57+
Add-Content -Path '.\SYSDBA.sql' -Value "CREATE USER SYSDBA PASSWORD 'masterkey';`r`nCOMMIT;`r`nQUIT;"
58+
.\isql -user sysdba employee -input SYSDBA.sql
59+
# Start Firebird
60+
.\firebird.exe -a
61+
Pop-Location
62+
}
4163
'MySQL' {
4264
Start-Service 'MySQL57'
4365
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)

build-common/NHibernate.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Condition="Exists('NHibernate.dev.props')" Project="NHibernate.dev.props"/>
33

44
<PropertyGroup>
5-
<NhVersion Condition="'$(NhVersion)' == ''" >5.4</NhVersion>
5+
<NhVersion Condition="'$(NhVersion)' == ''" >5.5</NhVersion>
66
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
77
<!-- Clear VersionSuffix for making release and set it to dev for making development builds -->
88
<VersionSuffix Condition="'$(VersionSuffix)' == ''">dev</VersionSuffix>
@@ -15,12 +15,13 @@
1515
<FileVersion Condition="'$(FileVersion)' == ''">$(VersionPrefix).0</FileVersion>
1616

1717
<NhAppTargetFrameworks Condition ="$(NhAppTargetFrameworks) == ''">net48;net6.0</NhAppTargetFrameworks>
18-
<NhLibTargetFrameworks Condition ="$(NhLibTargetFrameworks) == ''">net461;netcoreapp2.0;netstandard2.0;netstandard2.1</NhLibTargetFrameworks>
18+
<NhLibTargetFrameworks Condition ="$(NhLibTargetFrameworks) == ''">net461;net48;netcoreapp2.0;netstandard2.0;netstandard2.1;net6.0</NhLibTargetFrameworks>
1919
<NhNetFx>false</NhNetFx>
2020
<NhNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</NhNetFx>
2121
<!-- Visual Basic requires to use coma (,) as a separator, other project types - semicolon (;) -->
2222
<DefineConstants Condition="$(NhNetFx) AND '$(MSBuildProjectExtension)' != '.vbproj'">NETFX;$(DefineConstants)</DefineConstants>
2323
<DefineConstants Condition="$(NhNetFx) AND '$(MSBuildProjectExtension)' == '.vbproj'">NETFX,$(DefineConstants)</DefineConstants>
24+
<NoWarn Condition="'$(TargetFramework)' == 'net6.0'">$(NoWarn);SYSLIB0011</NoWarn>
2425

2526
<Product>NHibernate</Product>
2627
<Company>NHibernate.info</Company>

default.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
>
77

88
<property name="root.dir" value="." />
9-
<property name="bin.target.dir" value="net461" />
9+
<property name="bin.target.dir" value="net48" />
1010
<property name="test.target.dir" value="net48" />
1111

1212
<include buildfile="${root.dir}/build-common/common.xml" />

doc/reference/modules/basic_mapping.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,7 @@
23852385
<area id="onetoone9" coords="10 60"/>
23862386
<area id="onetoone10" coords="11 60"/>
23872387
<area id="onetoone11" coords="12 60"/>
2388+
<area id="onetoone12" coords="13 60"/>
23882389
</areaspec>
23892390
<programlisting><![CDATA[<one-to-one
23902391
name="propertyName"
@@ -2398,6 +2399,7 @@
23982399
formula="any SQL expression"
23992400
entity-name="entityName"
24002401
foreign-key="foreignKeyName"
2402+
optimistic-lock="true|false"
24012403
/>]]></programlisting>
24022404
<calloutlist>
24032405
<callout arearefs="onetoone1">
@@ -2471,12 +2473,20 @@
24712473
<literal>entity-name</literal> (optional): The entity name of the associated class.
24722474
</para>
24732475
</callout>
2474-
<callout arearefs="manytoone11">
2476+
<callout arearefs="onetoone11">
24752477
<para>
24762478
<literal>foreign-key</literal> (optional): Specifies the name of the foreign key
24772479
constraint for DDL generation.
24782480
</para>
24792481
</callout>
2482+
<callout arearefs="onetoone12">
2483+
<para>
2484+
<literal>optimistic-lock</literal> (optional - defaults to <literal>true</literal>):
2485+
Specifies that updates to this property do or do not require acquisition of the
2486+
optimistic lock. In other words, determines if a version increment should occur when
2487+
this property is dirty.
2488+
</para>
2489+
</callout>
24802490
</calloutlist>
24812491
</programlistingco>
24822492

doc/reference/modules/configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ in the parameter binding.</programlisting>
17281728
Use the assembly qualified class name of a custom <literal>IObjectsFactory</literal>
17291729
implementation.
17301730
</para>
1731-
<programlisting><![CDATA[<bytecode-provider
1731+
<programlisting><![CDATA[<objects-factory
17321732
type="className" />]]></programlisting>
17331733
<para>
17341734
You can also set this property by code by setting

lib/teamcity/firebird/firebird_installation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Installation steps for Firebird for NH TeamCity:
33

4-
1. Download Firebird (Firebird-3.0.2.32703_0_x64): https://www.firebirdsql.org/en/server-packages/;
4+
1. Download Firebird (Firebird-4.0.2.2816-0-x64): https://www.firebirdsql.org/en/server-packages/;
55
2. Run the installer AS ADMINISTRATOR... Use the default firebird password when prompted: masterkey.
66
3. Leave other settings with their defaults.
77
4. The setup should install Firebird on the machine;

psake.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Task Set-Configuration {
1414
'connection.driver_class' = 'NHibernate.Driver.FirebirdClientDriver';
1515
'dialect' = 'NHibernate.Dialect.FirebirdDialect'
1616
};
17+
'Firebird4' = @{
18+
'connection.connection_string' = 'DataSource=localhost;Database=nhibernate;User ID=SYSDBA;Password=masterkey;MaxPoolSize=200;';
19+
'connection.driver_class' = 'NHibernate.Driver.FirebirdClientDriver';
20+
'dialect' = 'NHibernate.Dialect.Firebird4Dialect'
21+
};
1722
'MySQL' = @{
1823
'connection.connection_string' = 'Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;SslMode=none;';
1924
'connection.driver_class' = 'NHibernate.Driver.MySqlDataDriver';
@@ -101,10 +106,8 @@ Task Set-Configuration {
101106

102107
Task Build {
103108
Exec {
104-
dotnet `
105-
build ./src/NHibernate.sln `
106-
-m:1 `
107-
-c Release
109+
dotnet build ./src/NHibernate/NHibernate.csproj -m:1 -c Release
110+
dotnet build ./src/NHibernate.sln -c Release
108111
}
109112
}
110113

0 commit comments

Comments
 (0)