Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jpa-dev] Truncated Time Nano Length

This was discussed here: https://github.com/jakartaee/persistence/issues/563

JPA 3.2 adds the secondPrecision member to the @Column annotation for this purpose. The specification says, that the maximum supported amount of fractional seconds should be used that can be used with the database version and JDBC driver, except for time, where no fractional seconds should be stored by default.

What difference do you observe?

Am 15.05.2025 um 07:04 schrieb hantsy bai via jpa-dev:
In a former project, when switching JPA providers, such as EclipseLInks to Hibernate, I found the LocalDateTime value is truncated into a different format.

I mean when reading the data from DB, different JPA providers return a different Nano value.

I remember that somewhere this is discussed, but I can not find it.

Is there a solution to resolve this, or there are some solutions provided at the JPA spec level?

---

Regards,

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy

_______________________________________________
jpa-dev mailing list
jpa-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jpa-dev

Back to the top