We have a large number of entities for different aspects/parts of the application. The JDL file has over 6,000 lines and growing. To have a better organization of these entities and prevent entity naming issues, we would like to group entities into different packages. Is that possible? If not, any other options for the same goal?
1 Answer
You can split your existing jdl definitions across multiple files. That would handle the overall file size. To use multiple jdl files you can pass them as different arguments to the same jhispter jdl
command.
In terms of naming, are you using microservices? That lets you specify different base packages and therefore define individual namespaces, but that could be a major change.
-
Thanks for your input. Do you mean to run the JDL import multiple times for various JDL files? If the app were broken into microservices, it unlikely would have an entity naming collision issue. I will add a prefix in front of entities to address this issue.– vicJul 12 at 16:44
-
You can run the jdl import multiple times or a single time like: ` jhipster jdl myfile1.jdl myfile2.jdl` Have a look at
jhipster jdl --help
– jelharouJul 12 at 17:23 -
Thanks for the info. I wasn't aware of the usage. Those entities are not totally independent, they are connected in one way or the others. I assume that importing multiple JDL files will work for a situation where one entity in one JDL file has a relationship with another entity in another JDL file.– vicJul 12 at 19:39