I have a domain class, in which I ve defined some methods which give the object a score based on different algorithms (eg. popularity).
I now want to retrieve a list of these objects sorted by one of these scores (eg. descending by popularity score).
Is there a way to do with with GORM?
Example class:
class SomeObject {
String title
Integer popularity() {
//some algorithm
return popularity
}
}