Hi, I am trying to concatenate query results but for some reason I can only do one union. If try to execution an union on the result of the first union I get an error:
staff = staff.Union(Guests) // is successful var Allstaff = staff.Union(Volunteers) // error here If I change the order of the union I still get the error. So is not the entity issue. Here is is the error. Thank you, Richard Xtensive.Orm.QueryTranslationException was unhandled HResult=-2146233088 Message=Unable to translate 'Query.All().Where(g => (g.BondingVisit.Id == 13057)).Select(g => new @<id, name,="" staff_type="">( g.Id, g.Guest.FirstName, "G" )).Union(Query.All().Where(v => (v.BondingVisit.Id == 13057)).Select(v => new @<id, name,="" staff_type="">( v.Id, v.Volunteer.FirstName, "V" ))).Union(Query.All().Where(s => (s.BondingVisit.Id == 13057)).Select(s => new @<id, name,="" staff_type="">( s.Id, s.AgencyStaff.FirstName, "S" ))).Count()' expression. See inner exception for details. Source=Xtensive.Orm StackTrace: at Xtensive.Orm.Linq.QueryProvider.TranslateTResult at Xtensive.Orm.Linq.QueryProvider.ExecuteTResult at System.Linq.Queryable.CountTSource at Xtensive.Orm.Linq.QueryProvider.TranslateTResult InnerException: Richard |
Hello Richard, unfortunately I can't help you with this information. Could you provide inner exception as well? It contains important details for this error.
Hi Denis,
I don't know why but today the problem is not happening anymore. Very strange....
I'll let you know if I come across it again.
Thank you,
Richard