In my database I have a column "year" which is an integer.
How can I search by using Criteria API (not by HQL) which records contain, for example "196..." in the year column?
I think it should be Restrictions.like
, but I got exception:
SEVERE: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer