Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
V2 2.0.6
-
None
-
Patch
Description
Substring filters such as the one below:
$filter=(substringof(%27Jan%27,FirstName)
Are translated into JPA where clauses similar to:
Where case when first_name like concat('%', 'Jan', '%') then 1 else 0 end=1
However, not all database support concat functions with more than 2 parameters. The SAP Hana database is one of them:
I would propose to turn the where clause into:
Where case when last_name like concat('%', concat('Jan', '%')) then 1 else 0 end=1
to get the clause to run on more database platforms:
Patch included in the attachments