Prezados,
Estou com um problema enorme e já naveguei por toda a web tentando resolvê-lo.
Tenho o seguinte método:
public List<Grupo> consultarData() throws DAOException {
try {
return this.getSession().createCriteria(Grupo.class).add(
Restrictions.ne("status", "Cancelado")).add(
Restrictions
.eq("data", new Timestamp(new Date().getTime())))
.list();
} catch (final HibernateException e) {
throw new DAOException(e);
}
}
E tenho registros no banco na data de hoje, tanto que ao executar a query que o hibernate gera direto no banco eu consigo resultados:
select
this_.id as id4_0_,
this_.idCooperativa as idCooper6_4_0_,
this_.data as data4_0_,
this_.idDestino as idDestino4_0_,
this_.idFuncionario as idFuncio8_4_0_,
this_.horaPartida as horaPart3_4_0_,
this_.qtdFuncionarios as qtdFunci4_4_0_,
this_.status as status4_0_
from
trabalhoeds.grupo this_
where
this_.status<>'Cancelado'
and this_.data='2011-07-17'
Alguém saberia me responder o motivo do hibernate não conseguir trazer os resultados? Já tentei com java.util.Date, java.sql.Date e agora com java.sql.Timestamp e até agora nada…
Minha coluna é do tipo date…
Obrigado a todos pela ajuda e atenção.

.