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:
session.createSQLQuery("select foo from bar where foo like '{%'");
session.createSQLQuery("select foo from bar where foo like (CHAR(123) || '%')");
this should work.
best regards,
Peter
|