Skip to content

Instantly share code, notes, and snippets.

@abrobston
Created February 22, 2016 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrobston/290430f197e60c4addf4 to your computer and use it in GitHub Desktop.
Save abrobston/290430f197e60c4addf4 to your computer and use it in GitHub Desktop.
Additional failing test case for NH-3845
[Test]
public void SourceTypeWhenOfTypeAppliedToSelectIsCorrect()
{
using (ISession session = OpenSession())
using (session.BeginTransaction())
{
var entityQuery = session.Query<IMainEntity>();
var result =
entityQuery.Where(
m =>
m.Properties.OfType<IPropertyEntityC>()
.Select(c => c.AnotherEntity)
.OfType<AnotherEntity>()
.Any(ae => ae.Text == "Another Entity Text")).ToList();
Assert.AreEqual(1, result.Count);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment