Grails: Nenhuma assinatura do método findAll () é aplicável aos tipos de argumento: String, ArrayList
Eu sou novo no grails e recebo o seguinte erro:No signature of method: Something.findAll() is applicable for argument types: (java.lang.String, java.util.ArrayList) values: [from Something AS s WHERE s.some_number LIKE ?, [%asdf%]]"
O erro ocorre quando eu corrotest-app
. Ocorre no seguinte local:
SomethingVO[] findBySomeNumber(String searchString) {
searchString = "%"+searchString+"%"
return Something.findAll("from Something AS s WHERE s.some_number LIKE ?",[searchString]).collect {
new SomethingVO(it);
}
}
A classeSomething
é um objeto de domínio:
package some.project.domain
class Something{
static belongsTo = [product:Product, productVersion:ProductVersion]
Long id
String name
String someNumber
static constraints = {
product (nullable:true)
productVersion (nullable:true)
}
}
Onde está o erro?
(Eu uso Grails 1.2.4)