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
The problem is with the JSON files in .Jhipster
directory. Whenever we upgrade JHipster or import new entity, JHipster runs the entire entities using JSON files in .JHipster
directory.
I couldn't get the exact solution but I did work around to get the solution. I just created new entity which is creating an issue. I imported the entity which generated new JSON file for the entity. I ignored other files created while importing this new JDL file. After this, I was able to upgrade the JHipster project.