Hello,
Just to prevent other people from falling into the same trap, here's what caused the TIMESTAMP comparison to fail:


When updating the record I had provided the setter method setTimestamp in BaseXxx.java with a java.util.Date. This was with hindsight maybe rather stupid but I did that because I saw the BaseXxx class declare it as java.util.Date.

When fetched from the database, somewhere in the Torque runtime the timestamp is declared as java.sql.Timestamp which is a subclass of java.util.Date and as such adds nanosecond precision. While setting the TIMESTAMP column with a java.util.Date is syntactically correct, it causes later comparisons to fail.

I am still not quite sure where I could / should have seen that a java.sql.Timestamp was required to handle TIMESTAMP columns.

Question to the Torque developers: would it not be wiser to declare timestamps as java.sql.Timestamp in the generated code?


Best Regards,


Tarlika Elisabeth Schmitz




doDelete does not delete the record as the following WHERE clause returns no results:


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



Reply via email to