nhibernate/nhibernate-core — pull request #80 by hazzik (2012-02-18 08:40:59+00:00)
Title: NH-3059: Linq - Contains broken when used on a path (regression)

Following linq query is falling

```csharp

var serialNumbers = new List { "5678", "789" };
var query = (from animal in db.Animals
where animal.Father != null && serialNumbers.Contains(animal.Father.SerialNumber)
select animal).ToList();

```

Fix for that is force `WhereJoinDetector` to rewrite identity subueries.

JIRA: https://nhibernate.jira.com/browse/NH-3059