I have:
Class Foo { String name; String value; Foo parent; //Foo.parent is OneToOne and nullable }
FROM Foo f WHERE (lower(f.name) like concat( lower('string') , '%' )) or (lower(f.value) like concat( lower('string') , '%' ...