I am facing following problems in Grails.
Here is my code in which I am trying to get list of all possible data and display it.
def c = Abc.createCriteria()
def results = c.list(){
eq("A", "a")
eq("B", "b")
}
As the results is huge it goes on fetching them and dies. I want to restrict the list fetch or put max size for it.
I tried using maxResults()
but it act as a late filter.
I want to put a
- timeout
- restrict the fetch
- if possible, handle all data without hitting Out of memory error.