I have this domain :
class Participation {
ParticipationStatus status
}
class ParticipationStatus{
String name
Date creationDate
}
I create a query :
Participation.createCriteria().list{
createAlias("status","statusAlias")
order "statusAlias.creationDate"
projections{
groupProperty "id"
}
}
But I received an error : Caused by: java.sql.SQLException: ORA-00979: N'est pas une expression GROUP BY
I 'm working 2 days ago on this query grrrr ! ;-)
Thanks a lot
Every field you use in aggregate queries (the one using
projections
) should be either agroupProperty
, or only an aggregate function argument (that is, inprojections
anyway). In this example, try