Bugs item #579863, was opened at 2002-07-10 16:55
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=579863&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Frederik Sauer (fredsa)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: EJB-QL w/ dates: BETWEEN, >=, <=

Initial Comment:
The following does not work (is it supposed to?) in
EJB-QL under 3.0.1RC1:
  WHERE someDateField BETWEEN ?1 AND ?2

The following work-around doesn't work either (this
should definately work IMHO):
  WHERE someDateField >= ?1
  AND someDateField <= ?2

One must instead resort to:
  WHERE (someDateField > ?1
  AND someDateField < ?2)
  OR someDateField = ?1
  OR someDateField = ?2

because the >=, <= and BETWEEN operators are not
accepted in combination with fields based on java.util.Date


----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-07-10 19:26

Message:
Logged In: YES 
user_id=251431

The EJB grammar does not allow date time values to be
compared with the  the >= or <= operators.  Here the the
grammer:

comparison_expression ::=
   string_value { =|<>} string_expression |
   boolean_value { =|<>} boolean_expression} |
   datetime_value { = | <> | > | < } datetime_expression |
   entity_bean_value { = | <> } entity_bean_expression |
   arithmetic_value comparison_operator single_value_designator

I just added support for this to JBossQL in cvs Branch_3_0
and HEAD.  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=579863&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to