Using the following jdl, I encounter an issue regarding embedded document. If I remove the annotation then the generation works fine.
`application {
config {
baseName myapp,
applicationType monolith,
packageName com.test.myapp,
authenticationType jwt,
databaseType mongodb,
clientFramework vue,
buildTool maven,
clientPackageManager npm,
clientTheme united,
clientThemeVariant primary,
dtoSuffix DTO,
enableSwaggerCodegen true,
enableTranslation true,
languages [en, nl, fr, de, it, es],
nativeLanguage en,
reactive true,
serverPort 8080,
searchEngine false,
enableSwaggerCodegen true,
testFrameworks [cypress, gatling]
}
entities
dto with mapstruct
service with serviceClass
paginate with pagination
}
entity Country {
countryName String
}
@embedded
entity Region {
regionName String
}
relationship OneToOne {
Country to Region
}`
Motivation for or Use Case
I want to embedded the document as specified in the official documentation.
Reproduce the error
Just try to generate with jhipster jdl ./test.jdl
Related issues
Not found in issues.
Suggest a Fix
I'm a new user of Jhipster (didn't have the opportunity to use this tool before) but when embedded, I don't know why we go into the processEagerLoadRelationships method since with MongoDB it will but a nested document with all its information in their but maybe in Jhipster generation process, the meaning is different and having a nested document is similar to eagerly load it for generation purpose.
Overview of the issue
Using the following jdl, I encounter an issue regarding embedded document. If I remove the annotation then the generation works fine.
`application { config { baseName myapp, applicationType monolith, packageName com.test.myapp, authenticationType jwt, databaseType mongodb, clientFramework vue, buildTool maven, clientPackageManager npm, clientTheme united, clientThemeVariant primary, dtoSuffix DTO, enableSwaggerCodegen true, enableTranslation true, languages [en, nl, fr, de, it, es], nativeLanguage en, reactive true, serverPort 8080, searchEngine false, enableSwaggerCodegen true, testFrameworks [cypress, gatling] } entities dto with mapstruct service with serviceClass paginate with pagination }
entity Country { countryName String }
@embedded entity Region { regionName String }
relationship OneToOne { Country to Region }`
Motivation for or Use Case
I want to embedded the document as specified in the official documentation.
Reproduce the error
Just try to generate with
jhipster jdl ./test.jdl
Related issues
Not found in issues.
Suggest a Fix
I'm a new user of Jhipster (didn't have the opportunity to use this tool before) but when embedded, I don't know why we go into the processEagerLoadRelationships method since with MongoDB it will but a nested document with all its information in their but maybe in Jhipster generation process, the meaning is different and having a nested document is similar to eagerly load it for generation purpose.
JHipster Version(s)
7.7.0
JHipster configuration
Welcome to JHipster v7.7.0
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04) OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
git version 2.25.1
node: v16.14.0
npm: 8.5.3
Docker version 20.10.9, build c2ea9bc
Docker Compose version v2.2.3
`application { config { baseName rdv, applicationType monolith, packageName com.rcibs.rdv, authenticationType jwt, databaseType mongodb, clientFramework vue, buildTool maven, clientPackageManager npm, clientTheme united, clientThemeVariant primary, dtoSuffix DTO, enableSwaggerCodegen true, enableTranslation true, languages [en, nl, fr, de, it, es], nativeLanguage en, reactive true, serverPort 8080, searchEngine false, enableSwaggerCodegen true, testFrameworks [cypress, gatling] } entities dto with mapstruct service with serviceClass paginate with pagination }
entity Country { countryName String }
@embedded entity Region { regionName String }
relationship OneToOne { Country to Region }`
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryNone it's the beginning of the project.
Browsers and Operating System
Not related