'How to make JHipster JDL Import to skip regenerating existing entities

I have a Monolith application generated by JHipster 6.7.0. My Local version of JHipster is 7.0.1. When I try to import a new entity using jhipster import-jdl app.jdl command, I am getting an issue with the the entities which are already available.

ERROR! Error at entity Ticket: relationship name is not synchronized {
   "relationshipName": "jobs",
   "otherEntityName": "ticketJob",
   "relationshipType": "one-to-many",
   "otherEntityRelationshipName": "ticket",
   "otherEntity": "[TicketJob Entity]",
   "otherEntityField": "id",
   "ownerSide": false,
   "collection": true,
   "otherSideReferenceExists": false,
   "otherEntityIsEmbedded": false
} with {
   "relationshipName": "ticket",
   "otherEntityName": "ticket",
   "relationshipType": "many-to-one",
   "otherEntityField": "id",
   "otherEntityRelationshipName": "ticketJob",
   "otherEntity": "[Ticket Entity]",
   "ownerSide": true,
   "collection": false,
   "otherSideReferenceExists": false,
   "otherEntityIsEmbedded": false,
   "relatedField": {
       "fieldName": "id",
       "id": true,
       "fieldNameHumanized": "ID",
       "fieldTranslationKey": "global.field.id",
       "autoGenerate": true,
       "dynamic": false,
       "fieldType": "Long",
       "fieldNameCapitalized": "Id",
       "fieldNameUnderscored": "id",
       "tsType": "number",
       "entity": "[Ticket Entity]",
       "jpaGeneratedValue": "sequence",
       "readonly": true,
       "fieldIsEnum": false,
       "fieldWithContentType": false,
       "fieldNameAsDatabaseColumn": "id",
       "columnName": "id",
       "fieldInJavaBeanMethod": "Id",
       "fieldValidate": false,
       "nullable": true,
       "unique": false,
       "uniqueValue": [],
       "path": [
           "id"
       ],
       "relationshipsPath": [],
       "reference": "[id Reference]",
       "relatedByOtherEntity": true
   } 

Is it possible to skip the existing entities while importing new entities with new version? Or is it easier to upgrade the existing entities to the latest version? (I get the same issue even I try to upgrade the application using jhipster upgrade command



Solution 1:[1]

I had the same error. I deleted everything (the json files) in .Jhipster directory. Then I ran jhipster jdl jhipster-jdl.jdl and everything worked!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike