I have created a query:
Code:
IQuery query = session.CreateQuery(
"SELECT E.account.id, E.equipmentType.id, SUM(E.quantity) " +
"FROM Entry AS E " +
"WHERE E.when >=:startDate AND E.when <:endDate " +
"GROUP BY E.account.id, E.equipmentType.id");
query.SetParameter("startDate", startDate.ToLongDateString());
query.SetParameter("endDate", endDate.ToLongDateString());
System.Collections.IList entries = query.List();
This returns a result as expected, but I need to access the collection columns directly to be able to read the results.
I would like to write
Code:
System.Collections.IList<MyQuery> entries = query.List<MyQuery>();
How do I write a mapping file to handle this?
Cheers
Neil