簡體   English   中英

如何使 JHipster JDL Import 跳過重新生成現有實體

[英]How to make JHipster JDL Import to skip regenerating existing entities

我有一個由 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",
   "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 jdl jhipster-jdl.jdl 一切正常!

問題出在.Jhipster目錄中的 JSON 文件上。 每當我們升級 JHipster 或導入新實體時,JHipster 使用.JHipster目錄中的 JSON 文件運行整個實體。

我無法得到確切的解決方案,但我確實設法得到了解決方案。 我剛剛創建了一個正在創建問題的新實體。 我導入了為實體生成新 JSON 文件的實體。 我忽略了在導入這個新的 JDL 文件時創建的其他文件。 在此之后,我能夠升級 JHipster 項目。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM