db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinkan <shin...@gmail.com>
Subject Re: SQL TIMESTAMP and Torque java.util.Date mapping.
Date Thu, 07 Aug 2008 15:09:40 GMT
Really thanks for your support.

Derby doc doesn't say much about this, but it seems that I have to specify
default="CURRENT_TIMESTAMP" to make them filled.
In fact the behavior is good, by not adding "default" clause, and adding
required = "false", I expect my DB to init it to NULL or equivalent.

Then, don't worry as I just discovered problem didn't come from Derby or
Torche, but from me using Java :D
I store UNIX timestamps in XML files (they are in SECONDS), then I try to
build java.util.Date with Long parse of these timestamp ... BUT, Java
expects milliseconds ...
As I stored my results in DB, all my data dates were buggy.

Some people, when confronted with a problem, think "I know, I'll use XML".
Now they have two problems. -- Jamie Zawinski / James Robertson

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message