Hi,
we've got the same Problem in a similar context and found a workaround: just encode the '{' with CHR(123) (on Oracle) or CHAR(123) (on mySQL).
For Oracle we would modify your query as follow:
select count(distinct v.id) from some_table v left join other_table p on v.id = p.foreign_id where upper(v.last_name) like upper('{%');
==>
select count(distinct v.id) from some_table v left join other_table p on v.id = p.foreign_id where upper(v.last_name) like upper( CHR(123) || '%');
voila ![](https://hibernate.atlassian.net/images/icons/emoticons/smile.gif)
Best regards, Peter
|