I am trying to run one SQL query using indexed query as, list.add("'%" + some_string + "%'"); and set in query(sample) like :
query=select * from table where name like ?1;
I am setting parameter as :
query.setParameter(1, list.get(0));
It doesn't work, instead if I put the value directly in query, like :
select * from table where name like '%"+some_string+"%'
It works. I am using JPA Hibernate and postgres database.
Is there any internal parsing of single quotes while setting parameter as
query.setParameter();