Closed georgemoralis closed 7 years ago
It would be something like
db.streamAll(em, Customer.class)
.where(c -> c.getName().toUpperCase().startsWith(prefix.toUpperCase()) )
Note: In order to do this query efficiently though, you should store the names in the database already in upper-case. Then, you can use indices to do the search. The query shown above involves scanning though the whole database to do the case-insensitive search.
I am looking a way to search string functions (compare , startsWith ) with case insensitive. Is there a a way to do that?