Skip to content

Commit fb079f2

Browse files
fredericDelaportehazzik
authored andcommitted
NH-4004 - Disabling Bulk manipulations for dialects not supporting temporary tables.
1 parent 938cbc6 commit fb079f2

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/NHibernate.Test/Hql/Ast/BulkManipulation.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ public ISession OpenNewSession()
1717
return OpenSession();
1818
}
1919

20+
protected override bool AppliesTo(Dialect.Dialect dialect)
21+
{
22+
// Some classes are mapped with table joins, which requires temporary tables for DML to work.
23+
return Dialect.SupportsTemporaryTables;
24+
}
25+
2026
#region Non-exists
2127

2228
[Test]

src/NHibernate.Test/Hql/Ast/HqlFixture.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ namespace NHibernate.Test.Hql.Ast
1313
[TestFixture]
1414
public class HqlFixture : BaseFixture
1515
{
16+
protected override bool AppliesTo(Dialect.Dialect dialect)
17+
{
18+
// Some classes are mapped with table joins, which requires temporary tables for DML to work,
19+
// and DML is used for the cleanup.
20+
return Dialect.SupportsTemporaryTables;
21+
}
22+
1623
protected HQLQueryPlan CreateQueryPlan(string hql, bool scalar)
1724
{
1825
return new QueryExpressionPlan(new StringQueryExpression(hql), scalar, new CollectionHelper.EmptyMapClass<string, IFilter>(), Sfi);

src/NHibernate.Test/Hql/Ast/WithClauseFixture.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ public ISession OpenNewSession()
1212
return OpenSession();
1313
}
1414

15+
protected override bool AppliesTo(Dialect.Dialect dialect)
16+
{
17+
// Some classes are mapped with table joins, which requires temporary tables for DML to work,
18+
// and DML is used for the cleanup.
19+
return Dialect.SupportsTemporaryTables;
20+
}
21+
1522
[Test]
1623
public void WithClauseFailsWithFetch()
1724
{

0 commit comments

Comments
 (0)