Realizar uma pesquisa SOMENTE com NOME do arquivo no banco
09/03/2010 00:00
Arquivo.findAll("from Arquivo a where a.nome = 'coisa'")
def campoUnico = Arquivo.findAll("select nome from Arquivo a where nome = 'coisa'")
def noticiasList = Noticia.withCriteria {
eq("entidade",session.entidade)
projections {
property "alteradoEm"
property "titulo"
property "chamada"
property "id"
}
maxResults 4
order("alteradoEm","desc")
}
def list = {
def arquivo = Arquivo.executeQuery( "select a.titulo, a.id, a.criadoEm, a.autor, a.setor, a.categoria from Arquivo a" )
params.max = Math.min(params.max ? params.int('max') : 10, 100)
[arquivo : arquivo, arquivoTotal: Arquivo.count()]
}
Para se registrar, clique aqui.