1

I have NH query

result = Session.Query<s>()
.Include(s => s.a)
.Include(x => x.b)
.Include(x => x.c);

and I have two filtered results

IQueryable<s> r1 = result.Where(x => x.c.Any(a => a.Id == "value"));
IQueryable<s> r2 = result.Where(x => x.d.Any(a => a.Id == "other"));

And I want to have

IQueryable<s> r1.Union(r2) 

Or

IQueryable<s> r1.Concat(r2).Distinct()

So far everything ok, code compile and run, but in run time I got error:

The ConcatResultOperator result operator is not current supported

How to concat this two results without lose NHibernate query context. I know I can cast to list and concat lists but I want still IQuerable.

BWA
  • 5,672
  • 7
  • 34
  • 45

1 Answers1

0

base on [NH-2710] Support Unions on HQL - NHibernate JIRA

  • it's not supported yet

  • you can up-vote the feature request

enter image description here

more :

Mohamed Elrashid
  • 8,125
  • 6
  • 31
  • 46
  • Note that relevant issues are now at Github: https://github.com/nhibernate/nhibernate-core/issues/937 and https://github.com/nhibernate/nhibernate-core/issues/867 – Oskar Berggren Jan 24 '19 at 01:04