Reputation: 17
After doing "jhipster import-jdl your-jdl-file.jh" to generate entities, if I found something missing (ie. relationship, entity, or field within an entity), can I redo the jh file and rerun the command again to make the changes? Appreciate the help!
Upvotes: 2
Views: 2686
Reputation: 669
Yes, you can. But you must be carful to:
Another approach that I prefer, is to use the command line to do entity changes commands to affect changed entities only. Use
jhipster entity entity-name
It will overwrite affected entity files only, but be carful that, these changes will be outside your JDL file. You still must be carful using source control as described above.
Upvotes: 1
Reputation: 505
It is indeed possible but this might erase some of the custom modifications to the model you've made as it is regenerating them.
That being said, I strongly advise you take a look at the liquibase capabilities offered by Jhipster (For SQL databases). With that, you just have to update your model classes using the right annotations and that will update your database model accordindly (After a few other steps). That can be used for small adjustments when you've already been working on your app, rather that re-generating everyhting, which would seem a bit overkill to me.
If you want the full procedure, take a look at the (well detailed) documentation : https://jhipster.github.io/development/ and go down to Using MySQL, MariaDB or PostgreSQL in development.
Hope this helps !
Upvotes: 0