I have to do Restrictions.like("sequenceNo", "%" + Integer.valueOf(sequenceNo.trim()) + "%")
.
The field sequenceNo
is integer type but the sequenceNo
param value is string. My problem is I get an exception java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
. For some reasons I really have to make my param a string data type. When I tried it in SQL to LIKE an integer it works.
Please help. Thanks.