rishi
rishi

Reputation: 1842

like query on long datatype in hibernate

When I execute like query on oracle on number datatype , it works fine i.e

  select * from customer c where c.customer_number like '%400%' 

Here customer_number is of 'number' datatype in oracle.I have to execute same query from hibernate but in my POJO this customer_number maps to a Long type. I am able to do this by HQL i.e

     from Customer c where c.customerNumber like %400%

How can I do it with criteria query? Thanks in advance

Upvotes: 1

Views: 1507

Answers (1)

Related Questions