0
I have a problem with my query return.
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_current as col_0_0_, MAX(rota0_.Dtlancamento) as col_1_0_ from [Rota] rota0_group by rota0_.Id ]