Java 如何使JHipster JDL导入跳过重新生成现有实体
我有一个由JHipster 6.7.0生成的Monolith应用程序。我的JHipster本地版本是7.0.1。当我尝试使用jhipster import jdl app.jdl命令导入新实体时,我发现已经可用的实体存在问题Java 如何使JHipster JDL导入跳过重新生成现有实体,java,spring,jhipster,jdl,Java,Spring,Jhipster,Jdl,我有一个由JHipster 6.7.0生成的Monolith应用程序。我的JHipster本地版本是7.0.1。当我尝试使用jhipster import jdl app.jdl命令导入新实体时,我发现已经可用的实体存在问题 ERROR! Error at entity Ticket: relationship name is not synchronized { "relationshipName": "jobs", "otherE
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
}
导入具有新版本的新实体时,是否可以跳过现有实体?还是更容易将现有实体升级到最新版本?(即使我尝试使用jhipster upgrade命令升级应用程序,我也会遇到同样的问题问题在于
.jhipster
目录中的JSON文件。无论何时升级jhipster或导入新实体,jhipster都会使用.jhipster
目录中的JSON文件运行整个实体
我无法得到确切的解决方案,但我确实找到了解决方案。我只是创建了一个新的实体,这造成了一个问题。我导入了为实体生成新JSON文件的实体。我在导入这个新的JDL文件时忽略了创建的其他文件。之后,我能够升级JHipster项目