I have a JBoss-QL query that contains

o.approvalCode = 'a'

in the where clause. This is causing JBoss to throw:

nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "\'a\'" at line 1, column 229.
Was expecting one of:
"ABS" ...
"LENGTH" ...
"LOCATE" ...
"SQRT" ...
"(" ...
"+" ...
"-" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<NUMERIC_VALUED_PARAMETER> ...
<NUMERIC_VALUED_PATH> ...
)]


This same query works just fine with Resin so I'm fairly certain that I haven't hosed the rest of the query.

I am using Postgres and have setup my datasource as PostgresDS using a datasource mapping of PostgreSQL 7.2. In that portion of standardjbosscmp-jdbc.xml there is this mapping:

       <mapping>
            <java-type>java.lang.Character</java-type>
            <jdbc-type>CHAR</jdbc-type>
            <sql-type>CHAR(1)</sql-type>
         </mapping>

In jbosscmp-jdbc.xml the field is described as:

         <cmp-field>
            <field-name>approvalCode</field-name>
            <column-name>approval</column-name>
        </cmp-field>

The approval column's data type is a 'char' in Postgres.

Is there some other syntax I need to use in order to hard code the 'a' into my JBoss-QL query? Some mapping that I've neglected to setup?
Any help is greatly appreciated,
-M@




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to