Absolutely, thank you Oskar, it's really close to NH-2049. The only trivial difference being the sample uses Criteria or HQL, while mine uses LINQ (that after all rely on HQL)
Oskar Berggren
August 8, 2014 at 9:57 AM
Likely a duplicate to one of the issues linked from NH-3653. If you don't mind, have a look at them and see if anything closely matches your scenario.
Let's say that we have a model like this:
If the hierarchy is mapped as Table Per Type, and you define a filter on Party, nHibernate generate the wrong statement when querying data.
Attached there is a test that demonstrate the issue