How to edit Jhipster Spring database

wlminus :

I'm currently working in a Spring project generated by Jhipster. Sometime i have to change my entity (domain) so every times, i have to change the liquibase changelog file and drop the database. So is there anyway like i just have to change my domain file and the liquibase auto re-generated changelog for me.

ex: this is My project structure

every time i want to change my entity i have to change my domain file, i have to change my liquibase changelog file too,

admlz635 :

Just run jhipster entity YourEntity and it will make that changes for you. If you have created the application by importing a JDL file, you can import it again to update the generated source code.

Updating an existing entity

The entity configuration is saved in a specific .json file, in the .jhipster directory. So if you run the sub-generator again, using an existing entity name, you can update or regenerate the entity.

When you run the entity sub-generator for an existing entity, you will be asked a question ‘Do you want to update the entity? This will replace the existing files for this entity, all your custom code will be overwritten’ with following options:

  • Yes, re generate the entity - This will just regenerate your entity. Tip: This can be forced by passing a --regenerate flag when running the sub-generator
  • Yes, add more fields and relationships - This will give you questions to add more fields and relationships
  • Yes, remove fields and relationships - This will give you questions to remove existing fields and relationships from the entity
  • No, exit - This will exist the sub-generator without changing anything

See:

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to compare Edit Text with Room Database Text

分類Dev

How to edit Hibernate settings in a Spring-Boot project?

分類Dev

How to edit Hibernate settings in a Spring-Boot project?

分類Dev

How to edit Hibernate settings in a Spring-Boot project?

分類Dev

How to vacuum database tables in a Spring Boot application?

分類Dev

JHipster Spring startup failed with Logback configuration error

分類Dev

How to use Elasticsearch for production in jHipster?

分類Dev

How to debug 'Your request cannot be processed' in JHipster?

分類Dev

How to disable new user email activation in JHipster ?

分類Dev

Can't Edit or Update Room database entries

分類Dev

Can't Edit or Update Room database entries

分類Dev

edit the values of a database row that are displayed in textboxes

分類Dev

How to use multiple spring-data applications with a shared database

分類Dev

How to show alerts to user in Spring MVC (Triggered by some DataBase fields)?

分類Dev

How to insert data from bean to the database in Spring MVC?

分類Dev

How to edit credentials in jenkins?

分類Dev

DiscordJS How To Edit Messages?

分類Dev

How to edit and concatenation video

分類Dev

How to Edit PDFs?

分類Dev

How to edit /etc/hosts file

分類Dev

How to edit the path in odbcinst -j

分類Dev

How to edit function setItem in Firefox?

分類Dev

How to edit JFXSpinner inner text

分類Dev

RealityKit – How to edit or add a Lighting?

分類Dev

How to let selenium edit an element

分類Dev

How to edit a facebook post in Python?

分類Dev

How to edit .bashrc without logging in

分類Dev

How to edit the file content in vi?

分類Dev

How to open and edit .wlmp video

Related 関連記事

ホットタグ

アーカイブ