I have the following scenario (Domain classes)
class Request {
String title
List statusUpdates
static hasMany = [statusUpdates: StatusUpdate]
}
and
class StatusUpdate {
Date dateCreated
String statusFrom
String statusTo
String notes
static belongsTo = Request
}
I am currently using createCriteria
to implement filtering and basic sorting of Request.
Now I want to get a list of Request
s starting from the most recently updated (ordered by the value of the field dateCreated
of the last
StatusUpdate
for the Request
)
Any hint?