Problem in DataSource-Groovy console

J

jeff020590

Guest
hello everyone, I'm a new member and a beginner in grails programming,,,

I encountered a problem with regards to groovy console, I did follow the instruction in the grails in action book but when I'm on the part where in saving data
Sample code---
new Quote(author: 'Larry Wall',
content: 'There is more than one method to our madness.').save() to database using grails this problem

this problem appears

----

1 compilation error:

unable to resolve class Quote
at line: 1, column: 1

I don't know how to fix this, I did search for the answer for this many times

Hope u guys can help me with this problem.
 

dave

Administrator
Staff member
Check what package your Quote class is defined in.
you probably need to import it, e.g. import com.blah.Quote;

or just put reference the fully qualified class name, e.g.
new com.blah.Quote(author: 'Larry Wall', content: 'There is more than one method to our madness.').save()
 
Top