Closed murdos closed 4 years ago
Since entity merge on JDL import has been added (https://github.com/jhipster/jhipster-core/commit/d39e15f0e584318c20e70caffe1ce57769ab5f1c) the import-jdl command always considers entities that have custom attributes in JSON entity files has changed. However once the json file is rewritten, nothing has changed.
Entity not changed is reported as changed, and this triggers the whole entity generation in generator-jhipster.
Put the following json in a file named MyEntity.json in your .jhipster folder (you can note the custom attribute "enableEntityAudit": false):
MyEntity.json
"enableEntityAudit": false
{ "name": "MyEntity", "fields": [ { "fieldName": "myField", "fieldType": "String" } ], "relationships": [], "changelogDate": "20190918211301", "entityTableName": "my_entity", "dto": "no", "pagination": "no", "service": "no", "jpaMetamodelFiltering": false, "fluentMethods": true, "clientRootFolder": "myapp", "applications": "*", "microserviceName": "myapp", "enableEntityAudit": false }
Import the following JDL:
entity MyEntity { myField String }
The entity will be reported as changed, but the json file won't change.
I'll add a PR.
6.3.0
entityName.json
.jhipster
Overview of the issue
Since entity merge on JDL import has been added (https://github.com/jhipster/jhipster-core/commit/d39e15f0e584318c20e70caffe1ce57769ab5f1c) the import-jdl command always considers entities that have custom attributes in JSON entity files has changed. However once the json file is rewritten, nothing has changed.
Motivation for or Use Case
Entity not changed is reported as changed, and this triggers the whole entity generation in generator-jhipster.
Reproduce the error
Put the following json in a file named
MyEntity.json
in your .jhipster folder (you can note the custom attribute"enableEntityAudit": false
):Import the following JDL:
The entity will be reported as changed, but the json file won't change.
Related issues
Suggest a Fix
I'll add a PR.
JHipster Version(s)
6.3.0
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System