renatsaf commented on issue #3755: URL: https://github.com/apache/netbeans/issues/3755#issuecomment-4730253810
I've opened #9448 to address this. It adds a **Date/Time API** option to the *Entity Classes from Database* wizard, right next to the existing *Collection Type* dropdown (the UI pattern suggested in the description). The default stays `java.util.Date` for backward compatibility; choosing `java.time (Java 8+)` maps temporal columns as: | SQL column | java.time | |---|---| | `java.sql.Date` | `java.time.LocalDate` | | `java.sql.Time` | `java.time.LocalTime` | | `java.sql.Timestamp` | `java.time.LocalDateTime` | Since `java.time` types are mapped natively by JPA 2.2+, no `@Temporal` annotation is emitted for them. One open question for reviewers: `TIMESTAMP` is mapped to `LocalDateTime` (the straightforward reverse-engineering choice). `Instant`/`OffsetDateTime` would handle timezones better but aren't a pure column mapping — happy to switch if maintainers prefer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
