Binding parameters are not working for equality but working for like operator
Code:
Query query = getSession().createQuery("select s from SuperTable s where s.superKey = :country);
i am trying to bind country using
query.setParameter("country", country.toUpperCase());
query.setString("country", country.toUpperCase());
query.setString(1, country.toUpperCase());
But none of the above are working. when i am trying to pass it using escaping its working fine.
Query query = getSession().createQuery("select s from SuperTable s where s.superKey = '"+country.toUpperCase()+"'");
Please suggest.