The moose likes Groovy and the fly likes Groovy Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Other Languages » Groovy
Reply Bookmark "Groovy Question" Watch "Groovy Question" New topic
Author

Groovy Question

vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
Hi
we are planning to use Groovy and Grails for a small project
we had a table with million records. Is it OK to create a Domain class for that table and use findby methods to retrieve data?
does the server gets all records and convert them to objects while start up or how it works . im confused.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6035
I believe the findBy method is implemented with either SQL or HQL statements under the covers. I think (meaning I can't remember if I read it in the docs or if it was discussed in the grails mailing list) that you can paginate through the results so can avoid getting them all back at once if it's a large results set.

Grails will not create objects for all database records on startup unless you explicitly code such behavior.

--Mark
 
 
subject: Groovy Question
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com