tags:

views:

39

answers:

1

Application requires a large download ( a recordset sourced from SQL server with ~200K rows or ~5MB) from a grails application. In c# I would use a dataReader but gorm with a hasMany defaults to sets and list that must be populated before using them.

What is the grails way to handle larger datasets that should be streamed?

A: 

I have not tried this myself, but I believe if you set the batchSize attribute for the relationship in the static mapping closure you can limit size of the collection to N results at a time. Sorry it's not a complete answer, but it's definitely where I'd start looking if you haven't done so already.

proflux
thanks, I will investigate.
jms
Nope. Documentation is buggy too. :) http://jira.codehaus.org/browse/GRAILS-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel
jms
d'oh! that's too bad, it sounded good on paper.
proflux
thanks for the help. Gave you a +1 on a different thread.
jms