grails « Property « JPA Q&A





1. Grails criteria, how to scape property    stackoverflow.com

Domain involved:

class QuestionarioQuestao {

Questionario questionario
Questao questao
The criteria function inside domain class:
 QuestionarioQuestao.createCriteria().list(){
            **questao{eq("topico", Topico.get(1))}**
       ...

2. HQL : max/limit result based on property value    stackoverflow.com

I have a domain, AccountTransaction

class AccountTransaction {
  Account account
  BigDecimal amount
  ...
}
I would like to get the maximum last 3 transactions of each account. Output expected:
id  | account ...