2 Replies Latest reply on Aug 28, 2002 4:05 PM by dsundstrom

    CMP 2.0/EJB-QL  boolean TRUE fails with MySQL

    dbeeson

      Hi,

      I am trying to get the following EJB-QL finder query to work at runtime (it deploys fine):

      SELECT DISTINCT OBJECT(o) FROM OrganizationBean AS o WHERE o.isCarrierRole = TRUE

      The bean has a boolean property "isCarrierRole" and the table has a column "iscarrierrole" defined as TINYINT which is what the MySql mapping for Boolean is supposed to be.

      When the bean tries to load I get the following log message :

      00:48:23,375 INFO [STDOUT] Caught finder exception javax.ejb.FinderException: Find failed: java.sql.SQLException: Column not found: Unknown column 'true' in 'where clause'

      It looks to me like JBoss's is improperly translating the EJB-QL boolean constant "TRUE" to become an SQL column name !

      Loading this bean with other finder queries (on other fields) works fine.

      Anyone have any ideas?

      Thanks,

      Doug Beeson
      Seventh Avenue Software Services
      Montreal, Canada



      Versions:
      JBoss 3.0.0 w/ Tomcat 4.0.3
      MySql 3.23.49 (mm.mysql 2.0.14 JDBC client)