2012-03-16 69 views
0

的Grails我要带给用户的会话,但使我空,如果有一个人的时候在会议MissingMethodException与springSecurity

 groovy.lang.MissingMethodException: No signature of method: 
     general.Evento.findByAllAsistentes() is applicable for argument types:(general.Usuario) values: [null] 

现在有了.currentUser尝试它,并且还与.principal但我并不觉得......

//def user = springSecurityService.currentUser 
    def user = Usuario.get(springSecurityService.principal.id) 
    log.debug "User: ${user}" // Not found, it prints null 

    Evento event = Evento.get(params.id) 

    if(!event.findByAllAsistentes(user)){ 
       log.debug "Asistent to Event" 
      } 

我需要你的帮助,请

回答

3

findByAllAsistentes也许应该findAllByAsistentes,除非你的事件摘要域对象有一个属性称为allAsistentes

+0

感谢您的回复如此之快...我没有意识到我有这个错误,我纠正了,但仍然继续让我上面的错误,另一个建议吗? – 2012-03-20 15:19:23

+0

很难说没有看到你的'Evento'域类。你可以发布吗? – ataylor 2012-03-20 18:56:00