No, on second thought, I was right the first time: Criteria has no
add(datecolumn, java.util.Date, comparison)

A non-portable work-around is to format the date into a MySQL-accepted
string format and submit that instead (using SimpleDateFormat):

        SimpleDateFormat df
            = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
        String now = formatter.format(new Date());
        Criteria c = new Criteria()
            .add( TableA.EXPIRES, now, Criteria.LESS_THAN );
        TableA.doDelete(c);

it is also curious that Torque DATE does not map to DATE but maps
to DATETIME, whereas Torque TIME maps to TIME and TIMESTAMP maps
to TIMESTAMP ... almost every SQL server supports DATETIME, so it
is probably a good idea to have DATE map to DATE and introduce a
DATETIME option.

-- 
Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to