We have problem to use date constants in EJB-QL.
We are using the JBoss feature 'dynamic ql' to generate
queries on the fly.
Example of EJB-QL:
SELECT OBJECT(container) FROM SMSContainer container WHERE container.accessPointID = '7321567789' AND container.creationTime > 1037314800 AND container.creationTime < 1038178800 AND container.messageType = 2
Error compiling ejbql: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1037314800" at line 1, column 128.
Was expecting one of:
Anyone who knows how to solve this ? Is it a bug in JBoss ? As I understand the EJB spec, date constants should be possible to use if expressed as long's.
We are using JBoss 3.0.4 and Oracle as data source.
The spec does not allow datetime literals of any format; it should work if you pass those longs as input parameters.