hibernate - jpa query not returning results by applying OR clause -
i have use case search cities given stateid , if name present include in query , if description present include part of query. stateid mandatory if name or description not passed query not filter out result. have written jpql
below need or
condition between name , description. result , and of name , description
- i need name or description.
also description should not match exact string passed should
like
matching string@query("select c city c (c.stateid=:stateid , ((:name null or c.name=:name) , (:description null or c.description=:description)))")
where doing wrong in above query wrote.
Comments
Post a Comment