Hi,

I am writing my first entity bean using CMP. 
I have a problem using the 'LIKE' operator in an EJB query.
I've not had any problems using the "=" operator. 


The error I get on deployment is: 

>Error compiling EJB-QL statement 'SELECT OBJECT(c)                                    
>                 >FROM Contract c
>            WHERE c.lastName LIKE ?1'; - nested throwable: 
> >(org.jboss.ejb.plugins.cmp.ejbql.ParseException: >Encountered "1" at line 2, column 
> 35.
>Was expecting:
>    <STRING_LITERAL> ...


The section from my ejb-jar is:

     
        <query-method>
           <method-name>findByLastName</method-name>
            <method-params>
<method-param>java.lang.String</method-param>
            </method-params>
         </query-method>
         <ejb-ql>
            SELECT OBJECT(c) FROM Contract c
            WHERE c.lastName LIKE ?1
         </ejb-ql>
           

Any help is much appreciated.

Cheers
John


    )]

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

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


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to