openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Subject Re: Timestamp precision question.
Date Mon, 18 Jun 2012 13:43:20 GMT
Hi Yu,
Can you clarify your request?    You said that your Timestamp fields are
persisted to the DB at a millisecond level.  But, I'm not following your
"print" comments and microsecond precision level.  After retrieved from the
DB, are the Timestamps still at a millisecond precision?  Or, are you
looking to store the Timestamp to the DB at a microsecond precision?
Various databases have different practices as it comes to Timestamp
precision.  If you could clarify what your expectations are, maybe
something can be figured out.  Thanks.


On Mon, Jun 18, 2012 at 4:31 AM, yu wang <> wrote:

> Hello,
> I am using OpenJPA 1.2.2 connecting oracle DB.
> For Timestamp field, the precision is always millisecond level after
> the filed is persisted into DB, regardless of I print the timestampe
> filed in java, its precision is microsecond level.
> Any specific configuration I am not aware of?
> Below is a sample:
>        @Basic()
>        @Column(name="LOGTIME")
>        public java.sql.Timestamp getLogtime() {
>                return this.logtime;
>        }
>        @Override
>        public void setLogtime(java.sql.Timestamp logtime) {
>                this.logtime = logtime;
>        }
> Regards,
> Yu Wang

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