Some applications are using NHibernate 2.1.2 yet. So they are forced to use old LINQ-to-NHibernate that comes with NHibernate 2.1.2 and can’t benefit new LINQ provider in NH 3.
There are two annoying problems with old LINQ-to-NHibernate. The first is inheritance related queries: “is” operator can’t be used. The second problem is not supporting “distinct”. For the first problem I added a read-only formula field based on discriminator column to “hbm” mapping file. After this, a query can use this fake field instead of “is” operator. But for the second problem I didn’t find any solution. Possibly I should use ICriteria instead of LINQ-to-NHibernate.