Having the following domain class:
class Message{
}
Want to get all messages with id more than offset:
def offset = params.offset
def messages = Message.list()
def subMessages = messages.findAll({offset, it ->
it.id > offset
}.curry(offset))
What’s wrong?
Upd: i understand that Message.list() can be executed as Message.list(params) but it’s not important now.
Example using a map
Integration test using a Grails domain class