Closed andrew-nguyen closed 12 years ago
Yes this behaviour differs from most other gorm implementations. It is intentional though. In case of large result sets it is more memory friendly. How would you like to use it in your gsp? The <g:each tag should have no problems with the iterator.
If you need an actual list, you can use groovys List converter: Domain.list().toList()
I am new to grails and recently moved from the mongodb plugin to this plugin. I pass a Domain.list() from my controller to gsp file. This plugin returns a MorphiaIterator while the gsp expects something more along the lines of a list. I'm not sure what grails/gorm actually uses but the semantics are different enough that I need to create my own list from the MorphiaIterator.