Skip to content

Commit 09b1d43

Browse files
committed
Test case
1 parent 782f8d7 commit 09b1d43

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/NHibernate.Test/FetchLazyProperties/FetchLazyPropertiesFixture.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,18 @@ public void TestLinqFetchProperty()
175175
AssertFetchProperty(person);
176176
}
177177

178+
[Test]
179+
public void TestLinqFetchPropertyAfterSelect()
180+
{
181+
using var s = OpenSession();
182+
var owner = s.Query<Animal>()
183+
.Select(a => a.Owner)
184+
.Fetch(o => o.Image)
185+
.FirstOrDefault(o => o.Id == 1);
186+
187+
AssertFetchProperty(owner);
188+
}
189+
178190
private static void AssertFetchProperty(Person person)
179191
{
180192
Assert.That(person, Is.Not.Null);

0 commit comments

Comments
 (0)