I want to add some attributes to the user entity, when I googled about it, I found a similar question :
How to modify existing entity generated with jhipster?
when I followed the steps in this post, I couldn't find the file user.json anywhere as @Roberto montioned
1) Edit the json file representing your entity (add/remove field, the syntax is pretty easy, check in the end of the file if is required any change to the general entity properties like 'fieldsContainOneToMany'...), you'll find it in:
<jhipster_root_folder>/.jhipster/entityName.json
How can I solve this ?
I think the best solution is a compromise between the two solutions offered by @Pedro and @alcuvi (who references to the JHipster Documentation):
First, create an "ExtendedUser" entity with the additional fields (don't forget to use git, you will have to undo this/delete the entity). A one-to-one relationship to "User" is not necessary.
After that, you can copy many parts from "ExtendedUser" to the other parts of the JHipster Application:
Adapt AccountResource.java and UserService.java (and UnitTests if you use them). This step is mostly done by using getters and setters copied in the step before. JHipster Documentation (https://jhipster.github.io/tips/022_tip_registering_user_with_additional_information.html) might be helpful here.
Delete the "ExtendedUser" Entity (using git, or manually, see also: How to delete an entity after creating it using jhipster?)
The *advantages* are:
I hope this information will help other developers in the future!