Re: Using wildcard % in Hibernate (v 3.2.5) with named query



On Sep 24, 11:22 pm, Lew <l...@xxxxxxxxxxxxx> wrote:
traneHead wrote:
Trying to use a named query put in a hbm like:
<query name="Point.findByTitle">
from Point point where point.title like :title
<query-param name="title" type="String" />
</query>

I reviewed the Java Persistence API today. Looks to me like :varName is a
syntax for a variable only; there is no concatenation to surrounding tokens.
You will have to include the wildcard ('%') in the substitution value for the
named parameter.

--
Lew

Thank you. That's the way.

.