Have a domain A110 it belong to A100.
I use createCriteria want to constraint by a100's column "noteDt"
A110.createCriteria().list() {
order("A100.noteDt", "asc")// <--not work
}
I wonder is there any way in Gorm criteria can do this?
or other method in grails except raw sql code?
Try following code --
A110.createCriteria().list() {
A100 {
order("noteDt", "asc")
}
}
or
A110.createCriteria().list() {
createAlias('A100', 'a100')
order("a100.noteDt", "asc")
}