From a59b6d0ea31e99c37c7571518762ac0238f22a31 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Mon, 31 Jul 2023 13:34:56 +0300 Subject: [PATCH] Enable tests for PostgreSQL --- .../GH1994/ManyToManyFilteredFixture.cs | 17 ----------------- .../NHSpecificTest/GH1994/Mappings.hbm.xml | 6 +++--- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/NHibernate.Test/NHSpecificTest/GH1994/ManyToManyFilteredFixture.cs b/src/NHibernate.Test/NHSpecificTest/GH1994/ManyToManyFilteredFixture.cs index a3ef363283a..4edb09d5cb1 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1994/ManyToManyFilteredFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/GH1994/ManyToManyFilteredFixture.cs @@ -1,6 +1,5 @@ using System.Linq; using NHibernate.Criterion; -using NHibernate.Dialect; using NHibernate.Linq; using NHibernate.SqlCommand; using NHibernate.Transform; @@ -30,14 +29,7 @@ protected override void OnTearDown() using (var session = OpenSession()) using (var transaction = session.BeginTransaction()) { - // The HQL delete does all the job inside the database without loading the entities, but it does - // not handle delete order for avoiding violating constraints if any. Use - // session.Delete("from System.Object"); - // instead if in need of having NHibernate ordering the deletes, but this will cause - // loading the entities in the session. - session.Delete("from System.Object"); - transaction.Commit(); } } @@ -59,9 +51,6 @@ public void TestUnfilteredLinqQuery() [Test] public void TestFilteredByWhereCollectionLinqQuery() { - if(Dialect is PostgreSQLDialect) - Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast"); - using (var s = OpenSession()) { var query = s.Query() @@ -143,9 +132,6 @@ public void TestQueryOverRestrictionWithClause() [Test] public void LazyLoad() { - if (Dialect is PostgreSQLDialect) - Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast"); - using (var s = OpenSession()) { var asset = s.Query().First(); @@ -158,9 +144,6 @@ public void LazyLoad() [Test] public void LazyLoadFiltered() { - if (Dialect is PostgreSQLDialect) - Assert.Ignore("Dialect doesn't support 0/1 to bool implicit cast"); - using (var s = OpenSession()) { s.EnableFilter("deletedFilter").SetParameter("deletedParam", false); diff --git a/src/NHibernate.Test/NHSpecificTest/GH1994/Mappings.hbm.xml b/src/NHibernate.Test/NHSpecificTest/GH1994/Mappings.hbm.xml index 449a4b8bc97..dba718ccde7 100644 --- a/src/NHibernate.Test/NHSpecificTest/GH1994/Mappings.hbm.xml +++ b/src/NHibernate.Test/NHSpecificTest/GH1994/Mappings.hbm.xml @@ -5,7 +5,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -39,7 +39,7 @@ - +