My Question is exactly like Grails Projections not returning all properties and not grouped
I have a following criteria
def sharedDocumentsInstance
For the sake of those still having this issue; Remove the provided params
object on the list method. So the criteria query above becomes:
def sharedDocumentsInstanceList = SharedDocuments.createCriteria().list {
createAlias('receiver', 'r')
createAlias('author', 'a')
eq("r.id",session.uid)
projections {
groupProperty("a.id")
property("a.firstName","firstName")
property("a.lastName","lastName")
property("a.emailAddress","email")
}
maxResults(params.max)
firstResult(params.offset)
order(params.sort, params.order)
}