My PostgreSQL query returns no results when a search string starts with an German umlaut like Ö
. I am using ilike
to get my results.
The problem is if only the first letter is an umlaut.... The PostgreSQL query alone works fine. There seems to be the problem with the combination of grails. Making further research I found out there is a problem with ilike when I change it to like it works fine.
def searchResult = Termin.createCriteria().listDistinct{
or {
ilike('vorname', '%' + searchString.trim() + '%')
ilike('nachname', '%' + searchString.trim() + '%')
}
order('nachname', 'asc')
maxResults(27)
}