|
How to create criteria for this kind attribute:
for example:
class Book {
static hasMany = [references:String]
Set references
}
when we need use some reference string as a search condition, how to find out books with these reference string?
------------------------------------------------------------------------------------------------
def books = Book.createCriteria().list() {
references {
ilike(?, 'grails user guide')
}
}
the above code will not work ... is anyone can give suggestions?
my solution is use sql PreparedStatment to query now.
|