{
Criteria criteria = getSession().createCriteria(Aluno.class, "a");
ProjectionList retorno = Projections.projectionList().create();
retorno.add(Projections.property("a.id"), "id");
retorno.add(Projections.property("a.nome"), "nome");
criteria.setProjection(retorno);
criteria.add( Restrictions.sqlRestriction("to_ascii({alias}.nome) ilike to_ascii(?)", "%jose%", Hibernate.STRING));
criteria.setResultTransformer(new AliasToBeanResultTransformer(Aluno.class));
Collection
System.out.println(alunos.size());
// CONSOLE:
// select
// this_.id as y0_,
// this_.nome as y1_
// from
// Aluno this_
// where
// to_ascii(this_.nome) ilike to_ascii(?)
}