apache / apache/netbeans

Include Java 8 time classes in the Entity Class Creation Wizard

Open
#3,755 1 comment 0 reactions 0 assignees View on GitHub
Contribution welcome Java EE/Jakarta EE kind:feature
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

The Wizard that creates the Entity Classes from Database uses the java.util.Date by default.

It would good if could be updated to work with the more modern Java8 Time classes, basically because they are the updated versions of it and have less problems with the handling of the time-zones and conversions of them when retrieving/storing the information in the database.

### Use case/motivation

I do not know how difficult would be, but probably the best option would be to allow the user to choose if they want to use java.util.Date or java.time classes, in a similar way to how they choose if they want to use Collection, Set or List for the relationships.

I want to remove the uses of Date from my projects and it is time consuming have to review all new entities to replace it for its best equivalent, but that is my particular case. Other people may need to use it for compatibility reasons, for example.

### Related issues

_No response_

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)

Contributor guide

Open the contributing guide

Research direction

Start by locating the Entity Class Creation Wizard and tracing how it selects java.util.Date and relationship collection types. Determine how a user choice between java.util.Date and java.time classes should affect generated entities, then verify that both choices produce usable database mappings and preserve the existing Date option.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.