I am using Grails 2.2.1 and can't seem to use GORM methods in the grails console:
import com.mypackage.*
MyDomainClass.list()
result:
groovy.lang.MissingMethodException: No signature of method: com.mypackage.ShippingLocation.list() is applicable for argument types: () values: []
Possible solutions: list(), list(java.util.Map), last(), last(java.lang.String), last(java.util.Map), first()
at com.mypackage.ShippingLocation.list(ShippingLocation.groovy)
at com.mypackage.ShippingLocation$list.call(Unknown Source)
at ConsoleScript1.run(ConsoleScript1:5)
Is this a version specific issue, or just me?
Turns out I forgot to add
pom true
to
grails.project.dependency.resolution
block of BuildConfig.groovy
once this was done, worked as expected. I have a Mavenized grails project.