Hy
I can't find a solution to my sql query.
I use MySQL and I have a query like this:
SELECT * from table where column1 like concat('%',column2,'%') and column2 <> 'sometext'
I have mapped this table to a Class, lat's say MyClass
I can't get hibernate to make that column1 like column2, there is no fuction to use like on 2 properties, something like ilikeProperty(property,anotherProperty)
session.createCriteria(MyClass.class)
.add(Restrictions.ne("column2","sometext"))
.add(Restrictions.ilike("column1",?????????)
.list()
|