NHibernate HQL Group by entity
Is it possible to execute a query like this in HQL without specifying all the column names.
select med, MAX(med.PrescriptionLines.Prescription.PrescriptionDate)
from Medication med
where med.Patient.PatientId = :patientId
group by med
This request extends all properties of the Medication object in the select, but in the group only extends med to be med.MedicationId. I don't want to list all properties of the drug object in the group by clause. Is there a way to do this?
I tried to replace the med group with the med group. * or group {med. *} but it doesn work.
Any ideas?
+2
source to share
1 answer
This is not implemented. Cm:
- https://nhibernate.jira.com/browse/NH-528
- http://opensource.atlassian.com/projects/hibernate/browse/HHH-1615 (this issue is over three years old).
0
source to share