openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Johnson (JIRA)" <>
Subject [jira] Created: (OPENJPA-433) Timestamp rounded upon database updating
Date Tue, 06 Nov 2007 05:23:50 GMT
Timestamp rounded upon database updating

                 Key: OPENJPA-433
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 1.0.0
         Environment: Postgresql dictionary; unsure if others are affected
            Reporter: Nick Johnson
            Priority: Minor

When updating a Timestamp field, OpenJPA is rounding the time to the nearest hundredth of
a second.  For example, in this case I print the Timestamp to stdout just before committing
the transaction.  Note the difference between the printed time and the time given in the SQL:

New time is 2007-11-04 21:16:49.906
4593  tally_ho  TRACE  [main] openjpa.jdbc.SQL - <t 1205211, conn 6232809> executing
prepstmnt 8529229 UPDATE Article SET create_date = ? WHERE object_id = ? [params=(Timestamp)
2007-11-04 21:16:49.91, (long) 1]

This is actually causing a unit test of mine (one which checks that the create_date field
updates correctly) to fail.  It's fairly easy to kludge around for now.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message