Parameters with new where queries in Grails 2.0
问题 Is it possible to use parameters when defining a where query in Grails 2.0? For example: def query = Book.where { id == it } Book sub = query.find(5) I tried running that code, but it throws a MissingMethodException on the call to find. I also tried defining a variable before it, but it doesn't seem to work (as find returns null, even though I know it exists). Long someId = 5 def query = Book.where { id == someId } Book sub = query.find() Any tricks? Being able to dynamically change the