Hello, I post this here also. you can fint it on SO too : Customize JPQLTemplate escape char for QueryDSL queries. I am using QueryDSL to filter my request in a SpringBoot/Data/Rest context to query Apache Phoenix with generated SQL through the Phoenix JDBC Driver. Problem is Phoenix SQL doesn't support the escape statement for example in like statements :
Using QueryDSL 4.1.4 I am unable to generate statements like :
Searching for a workaround I found out the escape character was defined in the QueryDSL template used. As I use Hibernate, the template picked is HQLTemplates and as JPQLTemplates it uses the default escape char '!'. Using the Spring Data naming convention I managed to generate the correct statement. Nonetheless using this method is way less flexible on filtering. So I really want to keep using QueryDSL. Anyone has a clean workaround for this ? Regards Loïc |