Bugs item #521558, was opened at 2002-02-22 10:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=521558&group_id=22866
Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Ignacio Coloma (alu1344)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: Wrong jdbc-type for params declared-sql
Initial Comment:
>From Feb 2002 a custom finder that worked nice before
is not working anymore. I can debug it into a Boolean
parameter that is being passed as SQL type of
Result.BIT instead of Result.TINYINT. The MySQL JDBC
driver does not recognize this type and I get a SQL
Exception (SQL Type not recognized).
So, the jdbc type is being mistaken here. Note that
the default JDBC type for Boolean for MySQL is TINYINT
in standardjbosscmp-jdbc.xml (double checked that).
That is correct. BIT is not.
JDK 1.3, RH built from CVS on 20-Feb-2002, Win2000.
MySQL JDBC driver 2.0.11
My ejb-jar:
==========
<query>
<query-method>
<method-name>findByComercialId</method-name>
<method-params>
<method-param>java.lang.Integer</method-
param> <!-- this one is ok -->
<method-param>java.util.Date</method-
param> <!-- this one is ok -->
<method-param>java.lang.Boolean</method-
param> <!-- SQL Exception: Unknown Types value -->
</method-params>
</query-method>
<ejb-ql>
</ejb-ql>
</query>
My jbosscmp-jdbc:
================
<defaults>
<datasource>java:/MySQLDS</datasource>
<type-mapping>mySQL</type-mapping>
</defaults>
...
<query>
<query-method>
<method-name>findByComercialId</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.util.Date</method-param>
<method-param>java.lang.Boolean</method-
param>
</method-params>
</query-method>
<declared-sql>
<select><distinct /></select>
<from>, CLIENTE, OFERTA_CLIENTE</from>
<where>
CLIENTE.ID = OFERTA_CLIENTE.CLI_ID AND
CLIENTE.COM_ID = {0} AND OFERTA.FECHA_FIN >=
{1}
AND OFERTA_CLIENTE.COMPRADO = {2}
</where>
<order>FECHA_INICIO DESC</order>
</declared-sql>
</query>
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=521558&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development