I have just dabbled into using Querydsl, and am thoroughly enjoying the improvement it brings to interacting with JPA.
One remaining question I have is why do you have to wrap a like
parameter with %
?
Have I improperly configured something? Considering there is a method for starts/endsWith
, I assumed like(str)
would automatically wrap my str
.
But to my surprise I needed to do this: "%" + str + "%"
to get what I had expected.
Why is that? Is there a better way?