Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-433

Timestamp rounded upon database updating

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 1.0.0
    • None
    • sql
    • None
    • Postgresql dictionary; unsure if others are affected

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            spatula Nick Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: