[ 
https://issues.apache.org/jira/browse/OPENJPA-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317165#comment-17317165
 ] 

ASF subversion and git services commented on OPENJPA-2863:
----------------------------------------------------------

Commit 683e78045cba80703154207a96e5935d64a076e1 in openjpa's branch 
refs/heads/master from Mark Struberg
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=683e780 ]

OPENJPA-2863 use MICROS for TIMESTAMP precision in Oracle

Default type for Oracle is TIMESTAMP(6) but somehow we did only
round to 3 fraction digits in the past.
Can be tweaked to the old value via DBDictionary config in persistence.xml


> java.time.LocalDateTime in Oracle gets rounded to just 3 digits
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-2863
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2863
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 3.1.2
>            Reporter: Karl Grosse
>            Assignee: Mark Struberg
>            Priority: Major
>
> Having a column like
>   
> {code:java}
>     @NotNull
>     @Column(name = "awayUntil", nullable = false)
>     private LocalDateTime awayUntil;
> {code}
> which we set to
> {code:java}
> awayUntil = LocalDate.of(2021, 4, 8).atTime(LocalTime.MAX);
> {code}
> gets somehow rounded to 2021-4-9 00:00:00,000000 after persisting into the 
> Oracle DB.
> The type of the column in Oracle is Timestamp(6).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to