here is my query:
query ="SELECT a FROM X a WHERE " +"a.level = :l and a.site =

and a.code like ':code%'")
my problem is tht im getting an exception saying [testng] javax.ejb.EJBException: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [code]
i basically want to search all values of code that contain the value of the parameter code thts y i have the % after it. for instance, if cud is 123 then
123ASS should be returned as well. please help!
Comments
You have to set the parameter in the code that uses the query.
It is not clear from your excerpt if you are doing this.