File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/NHibernate.Test/NHSpecificTest/GH3290 Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 77
88namespace NHibernate . Test . NHSpecificTest . GH3290
99{
10- [ TestFixture ]
10+ [ TestFixture ( true ) ]
11+ [ TestFixture ( false ) ]
1112 public class Fixture : TestCaseMappingByCode
1213 {
14+ private readonly bool _detectFetchLoops ;
15+
16+ public Fixture ( bool detectFetchLoops )
17+ {
18+ _detectFetchLoops = detectFetchLoops ;
19+ }
20+
1321 protected override HbmMapping GetMappings ( )
1422 {
1523 var mapper = new ModelMapper ( ) ;
@@ -63,11 +71,11 @@ protected override HbmMapping GetMappings()
6371
6472 protected override void Configure ( Configuration configuration )
6573 {
66- // Workaround fo the test case:
67- /*
74+ if ( _detectFetchLoops )
75+ return ;
76+
6877 configuration . SetProperty ( Environment . DetectFetchLoops , "false" ) ;
6978 configuration . SetProperty ( Environment . MaxFetchDepth , "2" ) ;
70- */
7179 }
7280
7381 protected override void OnSetUp ( )
@@ -99,7 +107,7 @@ protected override void OnTearDown()
99107 using var session = OpenSession ( ) ;
100108 using var transaction = session . BeginTransaction ( ) ;
101109
102- session . CreateSQLQuery ( "delete EntityToEntity" ) . ExecuteUpdate ( ) ;
110+ session . CreateSQLQuery ( "delete from EntityToEntity" ) . ExecuteUpdate ( ) ;
103111 session . CreateQuery ( "delete from System.Object" ) . ExecuteUpdate ( ) ;
104112
105113 transaction . Commit ( ) ;
You can’t perform that action at this time.
0 commit comments