Skip to content

Commit

Permalink
Fix DB2/400 schema generation on 5.3.x (#3451)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Artiukhin <[email protected]>
  • Loading branch information
fredericDelaporte and bahusoid authored Nov 28, 2023
1 parent 4dac4ca commit f3031ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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; }
}
}
}
}

0 comments on commit f3031ae

Please sign in to comment.