Anthony Geoghegan wrote: > EJB-QL does not support like statements with input parameters: > It's to do with CMP field's data type not being known till runtime. Thus the > like comparison can only be used on string literals
Not really. The spec guys wanted to support feature poor (i.e., crappy) datastores, so they crippled EJB-QL. Parameters in LIKE clauses will be supported in EJB 2.1. > Example: > > SELECT OBJECT(o) FROM Orders AS o WHERE o.customer LIKE '%Bloggs%' > See no input parameters. > > However JBossQL and certainly DeclaredSQL may provide a better avenue for > you to pursue if this is what you want. You can do this today in JBossQL. I would guess you want something like this: SELECT Object(t) FROM tableName t WHERE UCASE(t.firstName) LIKE CONCAT(UCASE(?1), '%') -dain ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
