Open sergrdz opened 3 years ago
Is the import-jdl behaviour different from the (java) jhipster?
Here is a quick snippet that I use as a work-around when I want to import only one entity by jdl:
jhipster import-jdl jdl.jh --json-only
jhipster entity EntityName --single-entity
About databaseType: I think this generator uses databaseType and ignores the others (prodDatabaseType and devDatabaseType) If I'm not mistaken.
I have a productive gateway with the Jhipster v6.10.1 version and only the affected entity is updated, I'm not sure if the behavior is maintained in the latest version.
It is correct that prodDatabaseType and devDatabaseType are ignored. I think if it is not used as in the base generator there may be incorrect behaviors, as in the case of pagination it is always set as NO_PAGINATION. And the files generated in the .jhipster folder always get a "no" in the "pagination" field, even if the definition says otherwise.
In this file you will find the validation generator-jhipster / generators / entity / index.js
if (! [SQL, MONGODB, COUCHBASE, NEO4J] .includes (context.databaseType)) { this.entityConfig.pagination = NO_PAGINATION; }
@sergrdz thanks for your feedback you are right this code
if (! [SQL, MONGODB, COUCHBASE, NEO4J] .includes (context.databaseType)) {
this.entityConfig.pagination = NO_PAGINATION;
}
introduce a bug i need to investigate to resolve it. In the meantime i think the command line suggested by @ivanmonteiro can help you
Overview of the issue
When the command is executed, all the entities are updated and not only the one with changes.
Reproduce the error
Suggest a Fix
The database type is set incorrectly in the file ".yo-rc.json", currently when generating a microservice with sqlite the file is generated as follows:
"databaseType": "sqllite", "prodDatabaseType": "mysql", "devDatabaseType": "h2Disk",
The correct thing should I think it should be, which is how it is generated in the java generator
"databaseType": "sql", "prodDatabaseType": "mysql", "devDatabaseType": "h2Disk",
When adjusting manually, entities with changes are already detected, but all entities are still updated.
JHipster Version(s)
3.0.1
Browsers and Operating System