Limitations of LINQ-to-NHibernate

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.

More info: link 1, link 2, link 3.

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *