Home > Back-end >  jhipster import-jdl error in jhipster gateway app when jdl has user entity relationship
jhipster import-jdl error in jhipster gateway app when jdl has user entity relationship

Time:02-23

I have generated a Jhipster gateway application using jhipster version 7.6.0. Here is my yo.rc

{
  "generator-jhipster": {
    "applicationType": "gateway",
    "authenticationType": "jwt",
    "baseName": "demo",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "no",
    "clientFramework": "angularX",
    "clientPackageManager": "npm",
    "clientTheme": "litera",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1645612665729,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 4200,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": true,
    "enableTranslation": false,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.6.0",
    "jwtSecretKey": "ZGZjMmY2NjBiOGYwNjQxZDE1MzU1MzlkY2VhOWU5ODM0MWFkOWYzZDA2NTcyNTI2ZTgxOTJlYmI2NTY0Y2JjOWNjODdjNWMyNmM4YTZkNTMyNTZhMDhkZTBlNzliYzI5YTE0OWM5ZjExNzc1YjE1YTI5ZWFiNzAzMDVkMTQwYTg=",
    "languages": ["en", "fr"],
    "messageBroker": "kafka",
    "nativeLanguage": "en",
    "otherModules": [],
    "packageName": "com.demo",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": true,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": ["messageBroker:kafka", "enableSwaggerCodegen:true"],
    "serviceDiscoveryType": "eureka",
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}

I have a app-jdl.jdl file with the following content

entity Blog {
  name String required minlength(3)
  handle String required minlength(2)
}

relationship ManyToOne {
  Blog{user(login)} to User
}

when I run jhipster import-jdl app-jdl.jdl I get the following error enter image description here

What is causing the issue and how can I fix it?

CodePudding user response:

your application auth type is

"authenticationType": "jwt"

check this post it seems its not supported in jwt yet

Jhipster - JDL studio - relationship to User

  • Related