Skip to content

Commit ee89456

Browse files
doroshenkofredericDelaporte
doroshenko
authored andcommitted
Add test for GH1436
1 parent 1e00fef commit ee89456

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/NHibernate.Test/LazyProperty/LazyPropertyFixture.cs

+22
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,27 @@ public void CanUpdateNonLazyWithoutLoadingLazyProperty()
166166
Assert.That(book.FieldInterceptor, Is.EqualTo("Why not that name?updated"));
167167
}
168168
}
169+
170+
[Test]
171+
public void CanMergeWithLazyProperty()
172+
{
173+
using (ISession s = OpenSession())
174+
using (var tx = s.BeginTransaction())
175+
{
176+
var book = new Book
177+
{
178+
Name = "some name two",
179+
Id = 2,
180+
ALotOfText = "a lot of text ..."
181+
};
182+
s.Merge(book);
183+
tx.Commit();
184+
}
185+
using (ISession s = OpenSession())
186+
{
187+
var book = s.Get<Book>(2);
188+
Assert.That(book, Is.Not.Null);
189+
}
190+
}
169191
}
170192
}

0 commit comments

Comments
 (0)