Skip to content

Commit 7310c52

Browse files
committed
NH-1978 - Fix tests for dialects with delayed save (for ex. sequence based IDs)
1 parent 78125d7 commit 7310c52

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

src/NHibernate.Test/NHSpecificTest/NH1978/AliasTest.cs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33

44
namespace NHibernate.Test.NHSpecificTest.NH1978
55
{
6-
[TestFixture]
7-
public class AliasTest : BugTestCase
8-
{
9-
[Test]
10-
public void ShouldReturnPlanFromEmployee()
11-
{
12-
using(var s = OpenSession())
13-
using (var trans = s.BeginTransaction())
14-
{
15-
var plan = new _401k {PlanName = "test"};
16-
s.Save(plan);
17-
s.Refresh(plan);
18-
var emp = new Employee {EmpName = "name", PlanParent = plan};
19-
s.Save(emp);
6+
[TestFixture]
7+
public class AliasTest : BugTestCase
8+
{
9+
[Test]
10+
public void ShouldReturnPlanFromEmployee()
11+
{
12+
using(var s = OpenSession())
13+
using (var trans = s.BeginTransaction())
14+
{
15+
var plan = new _401k {PlanName = "test"};
16+
s.Save(plan);
17+
s.Flush();
18+
s.Refresh(plan);
19+
var emp = new Employee {EmpName = "name", PlanParent = plan};
20+
s.Save(emp);
2021

21-
trans.Rollback();
22-
}
23-
}
24-
}
22+
trans.Rollback();
23+
}
24+
}
25+
}
2526
}

0 commit comments

Comments
 (0)