-
1. Re: Error compiling EJB-QL statement
bazza Dec 3, 2003 12:51 PM (in response to username)Does it work if you replace ?1 and ?2 by literals?
-
2. Re: Error compiling EJB-QL statement
bazza Dec 3, 2003 1:55 PM (in response to username)The following works fine for me with JBoss 3.2.2 (This is a modified example I found in the JBOSS Workbook for EnterpriseJavaBeans 3rd Edition):
<query-method> <method-name>findByTonnageBetweenVariables</method-name>
<method-params>
<method-param>double</method-param>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT( s ) FROM Ship s
WHERE s.tonnage BETWEEN ?1 AND ?2
</ejb-ql> -
3. Re: Error compiling EJB-QL statement
username Dec 4, 2003 3:11 AM (in response to username)I guess the problem is that my field in the where select is a String
and with String in Jboss I can just use <> or =.
Does anyone know if with String I can use just
<> and = in EJBQL select?
If it would be so it's quite strange because with websphere > between and < work with String and
in Sun J2EE tutorials I can't find this limit in EJBQL
and you can use between > and < with Strings...
Ok
Let me know.
Thanks.
U.