gorm - Find instance by name where query is any part of its name, Grails -
in java, string search its' substring goes this:
string string = "madam, adam"; b = string.matches("(?i).*i am.*"); how find instance in grails name query part of name?
i think you're looking for
domainclass.findbynameilike("%i am%") that case insensitive search record name containing "i am". not efficient way query database, if application experience kind of load, should use sparingly.
edit: documentation
Comments
Post a Comment