nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

NH-2679 - The UnionResultOperator result operator is not current supported

Open nhibernate-bot opened this issue 8 years ago • 5 comments

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

nhibernate-bot avatar Oct 12 '17 13:10 nhibernate-bot

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 avatar Jul 03 '20 02:07 fabiomaulo

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?

fernandocode avatar Jul 08 '21 18:07 fernandocode

@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?

fabiomaulo avatar Jul 09 '21 13:07 fabiomaulo

It depends on your specific case. Which is the result? entities or DTOs?

@fabiomaulo My case is entities.

fernandocode avatar Jul 09 '21 16:07 fernandocode

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

fabiomaulo avatar Jul 09 '21 18:07 fabiomaulo