1 Reply Latest reply on Nov 25, 2002 11:37 AM by jboynes

    use of date constants in EJB-QL

    nic

      Hi,

      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:
      <DATETIME_VALUED_PARAMETER> ...
      <DATETIME_VALUED_PATH> ...

      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.