I have a HQL query that uses data across several tables to pull in a list of objects. Part of the query requires case-sensitive comparison, but the default collation on the database is case insensitive.
I know that I can convert the query to SQL I can solve the issue by specifying collate utf8_bin
(I am targeting a MySql database), but this would require a more complicated query (from a code comprehension and maintenance perspective) so I'd like to avoid the SQL option if possible.
Unfortunately, HQL does not include the collate
token.
Is there a way to insert pieces of SQL in a HQL query?