Estou com um problema no meu retorno da 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_Atual as col_0_0_, MAX(rota0_.DtLancamento) as col_1_0_ from [Rota] rota0_ group by rota0_.Id ]