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,
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]
コメントを追加