If you do
LIKE :code
and then do
namedQuery.setParameter("code", "%" + this.value + "%");
Then value remains free from the ‘%’ sign. If you need to use it somewhere else in the same query simply use another parameter name other than ‘code’ .
If you do
LIKE :code
and then do
namedQuery.setParameter("code", "%" + this.value + "%");
Then value remains free from the ‘%’ sign. If you need to use it somewhere else in the same query simply use another parameter name other than ‘code’ .