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

Fix DB2/400 schema generation on 5.3.x #3451

Merged
merged 3 commits into from
Nov 28, 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
2 changes: 1 addition & 1 deletion .github/workflows/GenerateAsyncCode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
dotnet restore "./Tools/packages.csproj" --packages ./Tools
pushd src
dotnet restore ./NHibernate.sln
dotnet restore ./NHibernate.sln /p:TreatWarningsAsErrors=false
dotnet $(find ./../Tools/csharpasyncgenerator.commandline -name AsyncGenerator.CommandLine.dll)
popd

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