I am trying to figure out how to use a like with a named query in JPA / Spring 4. So far I have the following...
@NamedQuery(name = "MyClass.listItems",
query = "SELECT DISTINCT(a.name) FROM MyClass a where a.name like ?1")
The problem is I need the %
at the end and I am not sure how to add it. I tried like ?1%
but this gives a compile error.