QueryDSL with ignore accents

1.3k views Asked by At

How can I use Java QueryDsl and ignore accents in Oracle?
With HQL I can use translate function.

"upper(translate({alias}." + field + ",'âàãáÁÂÀÃéêÉÊíÍóôõÓÔÕüúÜÚÇç','AAAAAAAAEEEEIIOOOOOOUUUUCC')) like (?)";
1

There are 1 answers

0
Timo Westkämper On

You can use the same in Querydsl using

Expressions.stringTemplate("upper(translate({0}, 'âàãáÁÂÀÃéêÉÊíÍóôõÓÔÕüúÜÚÇç', 'AAAAAAAAEEEEIIOOOOOOUUUUCC'))")