JBOSS: 3.2.4
PostgresDB: 7.4.2

EJB XDocLet declaration:
 * @ejb.finder  signature="java.util.Collection findByInfo(java.lang.String info)"
 *              query=""
 * @jboss.declared-sql signature="java.util.Collection findByInfo(java.lang.String 
info)"
 *              where="idA LIKE '%{0}%'"
 *              strategy="on-find" 

jbosscmp-jdbc.xml
...
 <query-method>
  <method-name>findByInfo</method-name>
   <method-params>
<method-param>java.lang.String</method-param>
    </method-params>
</query-method>

Calling code:
BBeanUtil.getLocalHome().findByInfo("123");

Problem:
DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDeclaredSQLQuery.BBean#findByInfo] Executing 
SQL: SELECT id, idA, info FROM b WHERE info LIKE '%?%'
2004-08-03 10:36:11,197 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCDeclaredSQLQuery.BBean#findByInfo] Find failed
org.postgresql.util.PSQLException: Parameter index out of range.
        at 
org.postgresql.jdbc1.AbstractJdbc1Statement.bind(AbstractJdbc1Statement.java:2082)


Why I can't do a LIKE call (Postgres/JDBC-PG
admit this...)?

TIA
Roberto Colmegna


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843960#3843960

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843960


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to