Hello list,
I'm using Torque 3.3 with SAP's MaxDB 7.5.
This is what I want to do:
-----------------------------------
Criteria criteria = new Criteria();
criteria.add(OrdersPeer.DELIVERY_DATE, cal.getTime(),
Criteria.LESS_EQUAL);
This should bring up all rows with a "DELIVERY DATE" of max. the date in
the calender object "cal". The column DELIVERY DATE ist DATE column (not
timestamp). Thus, it should be rendered as:
SELECT DISTINCT ORDERS.ORDER_ID FROM ORDERS WHERE
ORDERS.DELIVERY_DATE<={d '2007-10-29'}
which would work fine.
The problem:
----------------
However, Torque generates this constraint (only difference is the use of
{ts XXX} instead of {d XXX}):
SELECT DISTINCT ORDERS.ORDER_ID FROM ORDERS WHERE
ORDERS.TARGET_DELIVERY_DATE<={ts '2007-10-29 09:35:09.556'}
Unfortunately, this leaves me with an internal MaxDB error: move error.
Don't ask me why the error message is apparently unrelated to the
problem, I tried do execute this query in a MaxDB client and found that
if I change the constraint to a pure date-wise comparison (as shown
above) it would work.
Is this a known issue? I am not 100% sure if this in fact is a MaxDB
error? IMHO it should work with timestamps as well. Anyway, if Torque
would use date comparison ({d XXX} instead of {ts XXX}), it would work
too. How can I get this to work?
TIA,
Alex