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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to