Let's see how we can create an entity using the JHipster entity generator with a React client side. We will create a simple Employee entity with the name, age, and date of birth fields:
- Open a Terminal and navigate to the folder of the React app and run
jhipster entity employee
. - Create the fields one by one, select yes for the question
Do you want to add a field to your entity?,
and start filling in the field name for the next question,What is the name of your field?
- Select
String
as the field type for the next question,What is the type of your field?
- For the question
Which validation rules do you want to add?,
chooseRequired
for name field and proceed. - Continue the process for the following fields.
age
anddob. age
are of type Integer anddob
is of type Instant. - When asked again,
Do you want to add a field to your entity?
, choose no. - For the next question,
Do you want to add a relationship to another entity?
, choose yes.
- Provide
user
as the name of...