Prior to using SD JPA, we had a unit test that tests Hibernate/HQL LIKE expressions that include HQL wildcard characters. Now, we're moving to JPA & SD JPA, and that unit test is broken.
Consider the following dynamic finder method:What is the default behavior of SD JPA when using LIKE? Does it just prepend & append '%' to the given string, or must the user do that before calling the dynamic like finder method? Does SD JPA check whether the given string contains '_' or '%' and escape them properly? Is it possible to specify the escape character? I can't seem to find any doc on this.
How does QueryDsl handle this situation? Their StringExpression does contain methodsbut I don't see how they handle user-specified wildcard escape characters.
Consider the following dynamic finder method:
List<Foo> findByNameLike(String s);
How does QueryDsl handle this situation? Their StringExpression does contain methods
BooleanExpression like(StringExpression str); BooleanExpression like(String str);