How can I read only the lastChild along with parentObject
Parent {
hasMany[children: Child]
}
here is my code
Parent.withCriteria() {
eq("active", true)
children {
order("dateCreated", "desc")
maxResults(1)
}
}
But not working. How can I read Parent with last updated child