Is it possible to filter the rows which string-columns contains special substring? Expressions like .whereContains("name", "Pavel")
throws exception: Exception: Filter "Contains" is not supported for mapping "String"
. Of course, I can easily use scala filter but DB should do it better, isn't it?
It seems like in whereContains
the path should refer to some collection, for example if you were searching for a name within a set of nested names of some entity.
What you want is to use whereLike("name", "Pavel")
, which uses an SQL LIKE
clause used for substring matching.