how to write JPQL query for similar characters

Viewed 1072

I have a query to select similar entities from db.

Query query = entityManager.createQuery("select c from Case c where c.lastName = :lastName");

But I have a problem.

The 'lastname' value of an entity is 'SAĞLAM' in database and the parameter of the query is 'SAGLAM' or vice versa. So the query doesn't give the entity.

The situation occurs for C/Ç, S/Ş , G/Ğ , O/Ö , U/Ü, I/İ.

How can I solve this problem? Can I write a regex?

1 Answers
Related