Grails: ninguna firma del método findAll () es aplicable para los tipos de argumento: String, ArrayList
Soy nuevo en Grails y recibo el siguiente error: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%]]"
El error ocurre cuando ejecutotest-app
. Ocurre en el siguiente lugar:
SomethingVO[] findBySomeNumber(String searchString) {
searchString = "%"+searchString+"%"
return Something.findAll("from Something AS s WHERE s.some_number LIKE ?",[searchString]).collect {
new SomethingVO(it);
}
}
La claseSomething
es un objeto de dominio:
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)
}
}
¿Dónde está el error?
(Yo uso Grails 1.2.4)