-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Range of Instant #288
Comments
What PostgreSQL column type do you think it's best to represent an |
The project I am working on now uses Hibernate 5.4.27.Final and when I set HBM2DDL_AUTO to auto it generates timestamp columns for Instant. We are on Postgres 12.5 with org.hibernate.dialect.PostgreSQL10Dialect. Seems like timestamp is a good match. |
Using Hibernate hbm2ddl is a terrible idea unless you are doing it for the very first incremental script. Flyway is the way. Timestamp is not a good match for Instant. LocalDateTime is. |
Yes this is exactly what I am doing... using hbm2ddl for my very first script. I will then take a dump of the schema and use it for my V1__ script in flyway when the app goes to production. |
Hibernate supports mapping a Java type to multiple DB types via SQL descriptors. If you send me a Pull Request that implements this issue, I'll review it. |
We found that |
The PostgreSQL |
Perhaps, but my answer was that |
@Kurru Right now the default deserialization of a tstzrange type in the PostgreSQLRangeType gets mapped to a Range. If you want to you can convert it manually afterwards in the client code, but changing the current implementation to use Instant would be backwards incompatible for current clients of the Range class. |
We dont use ranges, just java |
@Kurru The issue is about Range of Instant. The Java Instant is covered by Hibernate. |
+1 Support for Java
Narh. In my case Personally, I find it excellent that |
Another reason: A |
Would it make sense to Have a Range of Instants? We have a range of localdate time but Range of instant is equally useful?
The text was updated successfully, but these errors were encountered: