Yiannis Maglaras wrote:

I am running the latest version of torque (v.3-1) and using
pg74.1jdbc3.jar as postgres jdbc driver.
I have a table that contains a timestamp field, called send_date. I can
populate this table with new entries, but when it comes to selecting on
this field,


Timestamp ts = new java.sql.Timestamp(System.currentTimeMillis());
...
Criteria crit = new Criteria();
crit.add(MessagesPeer.SEND_DATE, ts, Criteria.LESS_EQUAL);

I am getting back java exceptions

[starter] java.lang.NullPointerException
 [starter]     at
org.apache.torque.util.SqlExpression.build(SqlExpression.java:283)
 [starter]     at


<snip/>

Is anyone aware of this issue? Thank you in advance

I'm not sure torque deals with this how you are expecting it to.

There is Criteria.addDate() which doesn't cater for times. Otherwise, format the current time as a String and use the regular Criteria.add(column, String, comparison) method.

Scott

--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



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



Reply via email to