Why does NHibernate's LINQ provider generate invalid T-SQL for a GroupBy()?

Here's a QueryOver version alias variables Manufacturer m = null; ManufacturerProducts dto = null; var result = Session. QueryOver .Left. JoinAlias(x => x.

Manufacturer, () => m) . SelectList(list => list . SelectGroup(() => m.Id).

WithAlias(() => dto. Id) . SelectGroup(() => m.

Name). WithAlias(() => dto.Name) . SelectCount(x => x.

Id). WithAlias(() => dto. ProductCount)) .

TransformUsing(Transformers.AliasToBean()) .List().

Here's a QueryOver version... //alias variables Manufacturer m = null; ManufacturerProducts dto = null; var result = Session. QueryOver .Left. JoinAlias(x => x.

Manufacturer, () => m) . SelectList(list => list . SelectGroup(() => m.Id).

WithAlias(() => dto. Id) . SelectGroup(() => m.

Name). WithAlias(() => dto.Name) . SelectCount(x => x.

Id). WithAlias(() => dto. ProductCount)) .

TransformUsing(Transformers.AliasToBean()) .List().

Var result = Session. JoinAlias(x => x. SelectGroup(() => m.Id).

SelectGroup(() => m.Name). SelectCount(x => x.Id). WithAlias(() => dto.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions