nhibernate-core
nhibernate-core copied to clipboard
NH-2679 - The UnionResultOperator result operator is not current supported
Michael Teper created an issue — :
var result1 = from foo in ISession.Query<Foo> where ... select foo.Bar; var result2 = from foo in ISession.Query<Foo> where ... select foo.Bar; var result3 = result1.Union(result2);
Fabio Maulo added a comment — :
Please, mappings and classes to create a test if you don't want send us a test.
Ricardo Peres added a comment — :
Also related with this: https://nhibernate.jira.com/browse/NH-2710, Support Unions on HQL
ahahahahah around 9 years later I have this issue with LINQ. btw, NH still has 7 ways to query RDBMS/model so... just use the other supported way.
ahahahahah around 9 years later I have this issue with LINQ. btw, NH still has 7 ways to query RDBMS/model so... just use the other supported way.
@fabiomaulo what would be the other ways to do this with NHibernate?
@fabiomaulo what would be the other ways to do this with NHibernate?
It depends on your specific case. Which is the result? entities or DTOs?
It depends on your specific case. Which is the result? entities or DTOs?
@fabiomaulo My case is entities.
So your option is H-SQL (the mix between SQL and HQL). Check at https://nhibernate.info/doc/nhibernate-reference/querysql.html paragraph Alias and property references