new to groovy and stuck on this for quite some time.
Heres the method in question.
protected User currentUser() {
def user = springSecurityService.currentUser
println "In currentUser Method"
println "Is userId null?"
println user.id == null
println user.id instanceof Long
User.get(user.id)
}
And User.get is a method in the GORM package
D get(Serializable id) {
execute({ Session session ->
session.retrieve(persistentClass, id)
} as SessionCallback)
}
Im getting the error
No signature of method: User.get() is applicable for argument types: () values: []
What I dont understand is that through the println statements I verified that
- user.id is not null
- user.id is instanceof Long , which implements the Serializable interface.
Any idea whats happening here?
Thank you.