File tree 9 files changed +30
-11
lines changed
Tools/hbm2ddl/SchemaMetadataUpdaterTest
Tools/hbm2ddl/SchemaMetadataUpdaterTest 9 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 16
16
CONNECTION_STRING : " DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
17
17
- DB : MySQL
18
18
CONNECTION_STRING : " Server=localhost;Uid=root;Password=nhibernate;Database=nhibernate;Old Guids=True;"
19
+ - DB : Oracle
20
+ 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)))"
19
21
- DB : SQLite
20
22
runs-on : ubuntu-latest
21
23
continue-on-error : ${{matrix.ALLOW_FAILURE == true}}
45
47
run : |
46
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
47
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:18-slim
54
+
48
55
- uses : actions/checkout@v2
49
56
- name : Setup .NET
50
57
uses : actions/setup-dotnet@v1.8.0
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ Task Set-Configuration {
62
62
' SqlServer2012' = @ {
63
63
' connection.connection_string' = ' Server=(local)\SQL2017;User ID=sa;Password=Password12!;initial catalog=nhibernate;' ;
64
64
' dialect' = ' NHibernate.Dialect.MsSql2012Dialect'
65
+ };
66
+ ' Oracle' = @ {
67
+ ' connection.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)))' ;
68
+ ' connection.driver_class' = ' NHibernate.Driver.OracleManagedDataClientDriver' ;
69
+ ' dialect' = ' NHibernate.Dialect.Oracle10gDialect'
65
70
}
66
71
}
67
72
# Settings for current build
Original file line number Diff line number Diff line change @@ -20,8 +20,11 @@ public class FixtureAsync : BugTestCase
20
20
{
21
21
protected override bool AppliesTo ( Dialect . Dialect dialect )
22
22
{
23
- // Firebird has issues with comments containing apostrophes
24
- return ! ( dialect is FirebirdDialect ) ;
23
+ return
24
+ // Firebird has issues with comments containing apostrophes
25
+ ! ( dialect is FirebirdDialect )
26
+ // GH-2853: Oracle client bug: throws Oracle.ManagedDataAccess.Client.OracleException : ORA-01008: not all variables bound
27
+ && ! ( dialect is Oracle8iDialect ) ;
25
28
}
26
29
27
30
protected override void Configure ( NHibernate . Cfg . Configuration configuration )
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public async Task without_filterAsync()
49
49
using ( var tx = session . BeginTransaction ( ) )
50
50
{
51
51
var q1 =
52
- "from Invoice i where i.Mode='a' and i.Category=:cat and not exists (from Invoice i2 where i2.Mode='a' and i2.Category=:cat and i2.Num=i.Num+1)" ;
52
+ "from Invoice i where i.Mode='a' and i.Category=:cat and not exists (from Invoice i2 where i2.Mode='a' and i2.Category=:cat and i2.Num=i.Num+1) order by i.Num " ;
53
53
var list = await ( session . CreateQuery ( q1 )
54
54
. SetParameter ( "cat" , 10 )
55
55
. ListAsync < Invoice > ( ) ) ;
@@ -70,7 +70,7 @@ public async Task with_filterAsync()
70
70
session . EnableFilter ( "modeFilter" ) . SetParameter ( "currentMode" , "a" ) ;
71
71
72
72
var q1 =
73
- "from Invoice i where i.Category=:cat and not exists (from Invoice i2 where i2.Category=:cat and i2.Num=i.Num+1)" ;
73
+ "from Invoice i where i.Category=:cat and not exists (from Invoice i2 where i2.Category=:cat and i2.Num=i.Num+1) order by i.Num " ;
74
74
var list = await ( session . CreateQuery ( q1 )
75
75
. SetParameter ( "cat" , 10 )
76
76
. ListAsync < Invoice > ( ) ) ;
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ public async Task WhenConfiguredOnlyExplicitAutoQuoteAsync()
254
254
// Test uses the default dialect driver, which will not accept Odbc or OleDb connection strings.
255
255
if ( typeof ( OdbcDriver ) . IsAssignableFrom ( driverClass ) || typeof ( OleDbDriver ) . IsAssignableFrom ( driverClass ) )
256
256
Assert . Ignore ( "Test is not compatible with OleDb or ODBC driver connection strings" ) ;
257
- var configuredDialect = Dialect . Dialect . GetDialect ( ) ;
257
+ var configuredDialect = Dialect . Dialect . GetDialect ( configuration . Properties ) ;
258
258
if ( ! configuredDialect . DefaultProperties . ContainsKey ( Environment . ConnectionDriver ) )
259
259
{
260
260
Assert . Ignore ( GetType ( ) + " does not apply to " + configuredDialect ) ;
Original file line number Diff line number Diff line change @@ -9,8 +9,11 @@ public class Fixture : BugTestCase
9
9
{
10
10
protected override bool AppliesTo ( Dialect . Dialect dialect )
11
11
{
12
- // Firebird has issues with comments containing apostrophes
13
- return ! ( dialect is FirebirdDialect ) ;
12
+ return
13
+ // Firebird has issues with comments containing apostrophes
14
+ ! ( dialect is FirebirdDialect )
15
+ // GH-2853: Oracle client bug: throws Oracle.ManagedDataAccess.Client.OracleException : ORA-01008: not all variables bound
16
+ && ! ( dialect is Oracle8iDialect ) ;
14
17
}
15
18
16
19
protected override void Configure ( NHibernate . Cfg . Configuration configuration )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public void without_filter()
38
38
using ( var tx = session . BeginTransaction ( ) )
39
39
{
40
40
var q1 =
41
- "from Invoice i where i.Mode='a' and i.Category=:cat and not exists (from Invoice i2 where i2.Mode='a' and i2.Category=:cat and i2.Num=i.Num+1)" ;
41
+ "from Invoice i where i.Mode='a' and i.Category=:cat and not exists (from Invoice i2 where i2.Mode='a' and i2.Category=:cat and i2.Num=i.Num+1) order by i.Num " ;
42
42
var list = session . CreateQuery ( q1 )
43
43
. SetParameter ( "cat" , 10 )
44
44
. List < Invoice > ( ) ;
@@ -59,7 +59,7 @@ public void with_filter()
59
59
session . EnableFilter ( "modeFilter" ) . SetParameter ( "currentMode" , "a" ) ;
60
60
61
61
var q1 =
62
- "from Invoice i where i.Category=:cat and not exists (from Invoice i2 where i2.Category=:cat and i2.Num=i.Num+1)" ;
62
+ "from Invoice i where i.Category=:cat and not exists (from Invoice i2 where i2.Category=:cat and i2.Num=i.Num+1) order by i.Num " ;
63
63
var list = session . CreateQuery ( q1 )
64
64
. SetParameter ( "cat" , 10 )
65
65
. List < Invoice > ( ) ;
Original file line number Diff line number Diff line change 74
74
<Reference Include =" System.Threading.Tasks" />
75
75
<Reference Include =" System.Data.OracleClient" />
76
76
<PackageReference Include =" Microsoft.SqlServer.Compact" Version =" 4.0.8876.1" />
77
- <PackageReference Include =" Oracle.ManagedDataAccess" Version =" 12.1.2400 " />
77
+ <PackageReference Include =" Oracle.ManagedDataAccess" Version =" 19.11.0 " />
78
78
</ItemGroup >
79
79
<ItemGroup Condition =" '$(TargetFramework)'=='netcoreapp2.0'" >
80
80
<PackageReference Include =" System.CodeDom" Version =" 4.7.0" />
81
81
<PackageReference Include =" System.Data.SqlClient" Version =" 4.8.2" />
82
82
<PackageReference Include =" System.Data.OracleClient" Version =" 1.0.8" />
83
+ <PackageReference Include =" Oracle.ManagedDataAccess.Core" Version =" 2.19.110" />
83
84
<PackageReference Include =" System.Data.Odbc" Version =" 4.7.0" />
84
85
<PackageReference Include =" System.Net.NameResolution" Version =" 4.3.0" />
85
86
<PackageReference Include =" NUnitLite" Version =" 3.13.2" />
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ public void WhenConfiguredOnlyExplicitAutoQuote()
259
259
// Test uses the default dialect driver, which will not accept Odbc or OleDb connection strings.
260
260
if ( typeof ( OdbcDriver ) . IsAssignableFrom ( driverClass ) || typeof ( OleDbDriver ) . IsAssignableFrom ( driverClass ) )
261
261
Assert . Ignore ( "Test is not compatible with OleDb or ODBC driver connection strings" ) ;
262
- var configuredDialect = Dialect . Dialect . GetDialect ( ) ;
262
+ var configuredDialect = Dialect . Dialect . GetDialect ( configuration . Properties ) ;
263
263
if ( ! configuredDialect . DefaultProperties . ContainsKey ( Environment . ConnectionDriver ) )
264
264
{
265
265
Assert . Ignore ( GetType ( ) + " does not apply to " + configuredDialect ) ;
You can’t perform that action at this time.
0 commit comments