Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Another attempt to fix NH-3280 for Firebird dialect.

  • Loading branch information...
commit 528b9a7f9d7821177164c605275dd9aceec068f4 1 parent db8dcdc
Alexander Zaytsev hazzik authored
16 src/NHibernate.Test/MappingByCode/IntegrationTests/NH3280/OneToOneToInheritedProperty.cs
@@ -7,19 +7,23 @@ namespace NHibernate.Test.MappingByCode.IntegrationTests.NH3280
7 7 [TestFixture]
8 8 public class OneToOneToInheritedProperty : TestCaseMappingByCode
9 9 {
  10 + private int _person1Id;
  11 + private int _person2Id;
  12 + private int _personDetailId;
  13 +
10 14 protected override void OnSetUp()
11 15 {
12 16 using (var session = OpenSession())
13 17 using (var tx = session.BeginTransaction())
14 18 {
15 19 var person1 = new Person { FirstName = "Jack" };
16   - session.Save(person1);
  20 + _person1Id = (int)session.Save(person1);
17 21
18 22 var person2 = new Person { FirstName = "Robert" };
19   - session.Save(person2);
  23 + _person2Id = (int)session.Save(person2);
20 24
21 25 var personDetail = new PersonDetail { LastName = "Smith", Person = person1 };
22   - session.Save(personDetail);
  26 + _personDetailId = (int)session.Save(personDetail);
23 27
24 28 tx.Commit();
25 29 }
@@ -83,9 +87,9 @@ public void ShouldConfigureSessionCorrectly()
83 87 using (var session = OpenSession())
84 88 using (session.BeginTransaction())
85 89 {
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);
89 93
90 94 Assert.IsNull(person2.PersonDetail);
91 95 Assert.IsNotNull(person1.PersonDetail);

0 comments on commit 528b9a7

Please sign in to comment.
Something went wrong with that request. Please try again.