Any suggestion how to fix this error? (I'd rather not create an sql view to skirt the issue with the sum aggregate)
"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.TreatmentDate, p.LastName, d.Description ) from TherapyMinutesModule.TherapySession t join t._Patient p join t._Discipline d group by t.TreatmentDate, p.LastName, d.Description]"
Here's the hql:
c.HSQL = "select"
+ " new TherapyMinutesDisciplineByDayDTO( sum(TreatmentTime), 2.0, 3.0, t.TreatmentDate, p.LastName, d.Description )"
+ " from TherapySession t"
+ " join t._Patient p"
+ " join t._Discipline d"
+ " group by t.TreatmentDate, p.LastName, d.Description"