How would I specify a JPA query like:
Query q =
em.createQuery(
"SELECT x FROM org.SomeTable x WHERE x.someString LIKE '%:someSymbol%'"
);
followed by:
q.setParameter("someSymbol", "someSubstring");
and not triggering a
org.hibernate.QueryParameterException: could not locate named parameter [id]
Much appreciated!
For reference, you could also use CONCAT:
query.setParameter(someSymbol, "%" + someSymbol+ "%");
How about
I'm pretty sure I once solved your problem like that.