I just had a quick question as I'm still learning grails. I have a controller class that just reads a text file and loads a list with information. I'm wanting to populate one of my domains through this list. Am I able to do it like this?
For instance, I have a bookController, the controller does something like
//psuedocode
import bookdemo.book
readFile(bookData) into list
int a = list.size
a.times {
new Book(Author:"$list.author", Title:"$list.title").save()
}
For some reason it doesn't add it to the list. I went ahead and looked through grails but I didn't find anything relevant or I missed it. When I print the list, it's populated. When I print the book it prints out 'bookdemo.book'
My apologies if this is very basic, I'm going to continue digging through grails.org while this question is posted.