Does it work if you replace ?1 and ?2 by literals?
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):
SELECT OBJECT( s ) FROM Ship s
WHERE s.tonnage BETWEEN ?1 AND ?2
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...
Let me know.