You can use (?i)
prefix in the value of the query parameters to conveniently specify conditions for case insensitive search by any part of
the string. For example, let us assume we have a query:
select c from sales$Customer c where c.name like :name
If we pass the string (?i)%doe%
as a value of the name
parameter, the search will return John Doe
, if such record exists in DB, even though the case of the D is different. This will happen because ORM will run the SQL query
with condition like lower(C.NAME) like ?
It should be kept in mind that such search will not use index on the name field, even if such exists in the DB.