-
1. Re: EJB-QL and LIKE operator
pazu Nov 19, 2001 12:49 PM (in response to abrasax)The EJB-QL specification doesn't allow parameters in LIKE operators. Yes, that's pretty much useless. Some vendors offer extensions that permit this.
MVCSoft Persistence Manager (www.mvcsoft.com) is one of them. It allows the ... LIKE ?1 syntax. -
2. Re: EJB-QL and LIKE operator
abrasax Nov 20, 2001 3:43 AM (in response to abrasax)Thank you for info.
I used LOCATE function instead. Anyway, it's a pitty and shame EJB QL doesn't support this...
Martin -
3. Re: EJB-QL and LIKE operator
ucftcys Apr 24, 2003 1:21 AM (in response to abrasax)Hi, Could you explain how to use LOCATE in this situation??
-
4. Re: EJB-QL and LIKE operator
lafr Apr 24, 2003 3:50 PM (in response to abrasax)It's also possible with jboss-ql.
From my address bean a search by matchcode with like (XDoclet tags):
* @ejb.finder signature="java.util.Collection findByMatchcode( java.lang.String matchcode )"
* view-type="local"
* query="SELECT OBJECT(o) FROM Address AS o WHERE o.matchcode LIKE '%SIEMENS%'"
* result-type-mapping="Local"
* @jboss.query signature="java.util.Collection findByMatchcode( java.lang.String matchcode )"
* query="SELECT OBJECT(o) FROM Address AS o WHERE o.matchcode LIKE ?1 ORDER BY o.addressId"