Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

EJB Query language

here is my query:

query ="SELECT a FROM X a WHERE " +"a.level = :l and a.site = :s 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

  • clb180clb180 Member Posts: 7
    Are you setting the parameter in the code that uses this JPQL query.
    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.
Sign In or Register to comment.