原文:Grails "max" subquery with an association, to get only the latest of a hasMany
The simplified domain model: Txn (as in Transaction) hasMany TxnStatus . TxnStatus has a dateTime This is a legacy mapping so I cant change the DB, the mapping on Txn: static mapping = { ...