Hi,
I am trying to achive the following :
Code:
String queryString = "select o from Productso where (o.productCategory like '%:category%' and o.productName like '%:name%' and o.id.productCountry like '%:country%' )";
Query query = entityManager().createQuery(queryString);
query.setParameter("name",name);
query.setParameter("category",category);
query.setParameter("country",country);
query.getResultList();
But when using the "%" operator the setParameter Method doesn't seem to work ... The other way would be building the queryString with the parameters as a string (whoch works) and not using the "setparameter" method which i am trying to avoid ...