| I provided the test case. Please read the java code comment // This test will produce the following SQL. // select entitya0_.id as id1_0_, entitya0_.name as name2_0_ from EntityA entitya0_ where substring(replace_not_registered(entitya0_.name, 'a', 'b'))='test' // For sure, replace_not_registered doesn't exist on H2 and will fail but the main issue is this part of the sql // substring(replace_not_registered(entitya0_.name, 'a', 'b')) -> this should be substring(replace_not_registered(entitya0_.name, 'a', 'b'), 1, 2) |