Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: traneHead <david.tiselius@xxxxxxxxx>
- Date: Tue, 25 Sep 2007 21:35:59 -0000
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.
.
- References:
- Using wildcard % in Hibernate (v 3.2.5) with named query
- From: traneHead
- Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: Lew
- Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: traneHead
- Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: Lew
- Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: traneHead
- Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- From: Lew
- Using wildcard % in Hibernate (v 3.2.5) with named query
- Prev by Date: Re: Finding a value by approximation / estimation
- Next by Date: Re: OT: Unicode and vi(m). Was Re: Great SWT Program
- Previous by thread: Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- Next by thread: Re: Using wildcard % in Hibernate (v 3.2.5) with named query
- Index(es):