Skip to content

Commit 528b9a7

Browse files
committed
Another attempt to fix NH-3280 for Firebird dialect.
1 parent db8dcdc commit 528b9a7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/NHibernate.Test/MappingByCode/IntegrationTests/NH3280/OneToOneToInheritedProperty.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@ namespace NHibernate.Test.MappingByCode.IntegrationTests.NH3280
77
[TestFixture]
88
public class OneToOneToInheritedProperty : TestCaseMappingByCode
99
{
10+
private int _person1Id;
11+
private int _person2Id;
12+
private int _personDetailId;
13+
1014
protected override void OnSetUp()
1115
{
1216
using (var session = OpenSession())
1317
using (var tx = session.BeginTransaction())
1418
{
1519
var person1 = new Person { FirstName = "Jack" };
16-
session.Save(person1);
20+
_person1Id = (int)session.Save(person1);
1721

1822
var person2 = new Person { FirstName = "Robert" };
19-
session.Save(person2);
23+
_person2Id = (int)session.Save(person2);
2024

2125
var personDetail = new PersonDetail { LastName = "Smith", Person = person1 };
22-
session.Save(personDetail);
26+
_personDetailId = (int)session.Save(personDetail);
2327

2428
tx.Commit();
2529
}
@@ -83,9 +87,9 @@ public void ShouldConfigureSessionCorrectly()
8387
using (var session = OpenSession())
8488
using (session.BeginTransaction())
8589
{
86-
var person1 = session.Get<Person>(1);
87-
var person2 = session.Get<Person>(2);
88-
var personDetail = session.Get<PersonDetail>(1);
90+
var person1 = session.Get<Person>(_person1Id);
91+
var person2 = session.Get<Person>(_person2Id);
92+
var personDetail = session.Get<PersonDetail>(_personDetailId);
8993

9094
Assert.IsNull(person2.PersonDetail);
9195
Assert.IsNotNull(person1.PersonDetail);

0 commit comments

Comments
 (0)