Skip to content

Commit 396a962

Browse files
committed
Enable tests for PostgreSQL
1 parent df87299 commit 396a962

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/NHibernate.Test/NHSpecificTest/GH1994/ManyToManyFilteredFixture.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Linq;
22
using NHibernate.Criterion;
3-
using NHibernate.Dialect;
43
using NHibernate.Linq;
54
using NHibernate.SqlCommand;
65
using NHibernate.Transform;
@@ -30,14 +29,7 @@ protected override void OnTearDown()
3029
using (var session = OpenSession())
3130
using (var transaction = session.BeginTransaction())
3231
{
33-
// The HQL delete does all the job inside the database without loading the entities, but it does
34-
// not handle delete order for avoiding violating constraints if any. Use
35-
// session.Delete("from System.Object");
36-
// instead if in need of having NHibernate ordering the deletes, but this will cause
37-
// loading the entities in the session.
38-
3932
session.Delete("from System.Object");
40-
4133
transaction.Commit();
4234
}
4335
}
@@ -59,9 +51,6 @@ public void TestUnfilteredLinqQuery()
5951
[Test]
6052
public void TestFilteredByWhereCollectionLinqQuery()
6153
{
62-
if(Dialect is PostgreSQLDialect)
63-
Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast");
64-
6554
using (var s = OpenSession())
6655
{
6756
var query = s.Query<Asset>()
@@ -143,9 +132,6 @@ public void TestQueryOverRestrictionWithClause()
143132
[Test]
144133
public void LazyLoad()
145134
{
146-
if (Dialect is PostgreSQLDialect)
147-
Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast");
148-
149135
using (var s = OpenSession())
150136
{
151137
var asset = s.Query<Asset>().First();
@@ -158,9 +144,6 @@ public void LazyLoad()
158144
[Test]
159145
public void LazyLoadFiltered()
160146
{
161-
if (Dialect is PostgreSQLDialect)
162-
Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast");
163-
164147
using (var s = OpenSession())
165148
{
166149
s.EnableFilter("deletedFilter").SetParameter("deletedParam", false);

src/NHibernate.Test/NHSpecificTest/GH1994/Mappings.hbm.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<class name="Base" abstract="true" dynamic-update="true" lazy="true">
66
<id name="Key" column="pdoid" generator="guid.comb"/>
77

8-
<property name="IsDeleted" column="IsDeleted" />
8+
<property name="IsDeleted" column="IsDeleted" type="TrueFalse" />
99

1010
<filter name="deletedFilter" condition="IsDeleted = :deletedParam"/>
1111

@@ -26,7 +26,7 @@
2626
</bag>
2727
<set name="DocumentsFiltered" table="asset_to_document" lazy="true" cascade="none">
2828
<key column="AssetId"/>
29-
<many-to-many class="Document" column="DocumentId" where="IsDeleted = 0"/>
29+
<many-to-many class="Document" column="DocumentId" where="IsDeleted = 'F'"/>
3030
</set>
3131
</union-subclass>
3232

@@ -39,7 +39,7 @@
3939
</union-subclass>
4040

4141
<filter-def name="deletedFilter">
42-
<filter-param name="deletedParam" type="bool"/>
42+
<filter-param name="deletedParam" type="TrueFalse"/>
4343
</filter-def>
4444

4545
</hibernate-mapping>

0 commit comments

Comments
 (0)