Nhibernate: can't determine data type of aggregate?

T. TreatmentTime? Edit: From comments below since my answer wasn't clear at all (sorry) replace: sum(TreatmentTime) with sum(t.

TreatmentTime).

I need the sum of the times. – Jay Jul 23 '09 at 14:47 yah, but isn't TreatmentTime a member of TherapySession? – eyston Jul 23 '09 at 15:17 Imagine the SQL you would write ... select t.

TreatmentDate, sum(t. TreatmentTime) from TherapySession t group by t. TreatmentDate ... right?(ignoring the patient / discipline stuff atm).

– eyston Jul 23 '09 at 15:18 That's the correct sql. I think it's trying to do it but can't figure out the data type of the sum() aggregate function. If I do it without the sum it works just fine.

I could move the sum to a view but I'd prefer to avoid that hack if possible. The database already has too much cruft in it. – Jay Jul 23 '09 at 15:51 You have sum(TreatmentTime) instead of sum(t.

TreatmentTime) is what I'm saying. – eyston Jul 23 '09 at 15:53.

"Can't extract the type of one parameter of a HQL function: expression->{TreatmentTime}; check aliases. Select new TherapyMinutesDisciplineByDayDTO( sum(TreatmentTime), 2.0, 3.0, t. Description ) from TherapyMinutesModule.

TherapySession t join t. _Patient p join t. _Discipline d group by t.

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