MaritimeSource wrote:
Solution: As the other thread suggested, I changed it to this and it worked:
query += "p." + key + " like '%' || ? || '%'";
nathanmoon wrote:
Sorry! I should've searched on the ERROR MSG, and I might have found this. (Although searching by phrases would be really useful in this forum -- too bad for PHPBB)
I do this:
Code:
Criteria criteria = s.createCriteria(myclass.class)
.add(Restrictions.like("id", id + "%"))
.add(Restrictions.like("description", description + "%"))
.addOrder(Order.asc("id")) ;