Java 8 adds a whole new Date & Time API that is a significant improvement over java.util.Date, java.util.Calendar, AND Joda types. It would be fantastic if Hibernate 4.2.x or at least 4.3.x could support these datatypes. Is there a plan in place to make this happen? Doing so could be accomplished (through reflection) without compiling Hibernate against Java 8.
In particular, it would be great to see the following classes supported natively without the user having to do anything other than annotate with @Temporal:
java.time.Instant java.time.LocalDate java.time.LocalDateTime java.time.LocalTime java.time.OffsetDateTime java.time.OffsetTime java.time.ZonedDateTime
Also, it would be great to have some kind of support for these types as well:
java.time.Duration (as a string column or a numeric column) java.time.Period (as a string column or a numeric column) java.time.YearMonth (as a string column, or as a year-month column if the dialect supports) java.time.MonthDay (as a string column, or as a month-day column if the dialect supports) java.time.ZodeId (as a string column)
Thoughts? Is this already happening?
|