I have a problem with my return from the query.
public IList<Rota> Lista()
{
//* string hql = "SELECT * FROM Rota WHERE ORDER BY Km_Atual ASC";
string hql = "SELECT Km_Atual, MAX(DtLancamento) FROM Rota GROUP BY Id";
//* string hql = "SELECT p FROM Rota p";
IQuery query = session.CreateQuery(hql);
return query.List<Rota>();
}
An exception of type 'NHibernate.Exceptions.GenericADOException' occurred in NHibernate.dll but was not handled in user code
Additional information: could not execute query
[select rota0_.Km_Anal the col_0_0_, MAX (rota0_.DtLancamento) the col_1_0_ from [Rota] rota0_ group by rota0_.Id]