db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Huang" <danih...@cisco.com>
Subject RE: PostgreSQL TIMESTAMP comparison fails
Date Tue, 13 Apr 2004 00:06:24 GMT
A possible workaround for your doDelete().

Assuming that obj holds the object you want to delete and no further checks
need to be done before deleting obj, you can call
Peer.doDelete(obj.getPrimaryKey())

This will generate a delete with where clause containing only the primary
key columns.

Regards,
Daniel

-----Original Message-----
From: T E Schmitz [mailto:mail@numerixtechnology.de]
Sent: Monday, April 12, 2004 3:58 PM
To: Apache Torque Users List
Subject: PostgreSQL TIMESTAMP comparison fails

Hello,

I created a table with a required TIMESTAMP attribute.
I selected a perviously created record via torque, then attempted DELETE
with doDelete (obj).

doDelete does not delete the record as the following WHERE clause
returns no results:
whereClause=BRAND_NAME='Olympus' AND TIMESTAMP={ts '2004-04-11
17:36:51.291'}

The timestamp comparison obviously fails. (Before I had a TIMESTAMP
column, doDelete (obj) worked fine).


Do you have any ideas why and, more importantly, is there a work-around?

PostgreSQLs TIMESTAMP type is WITH TIME ZONE. I also tried  TIMESTAMP
WITHOUT TIMEZONE but that causes a crash.

I noticed Torque uses java.util.Date rather than java.sql.Date.

--


Regards,

Tarlika Elisabeth Schmitz

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message