Closed Futureglobe closed 1 year ago
We also have the same problem in our project.
@mshima / @DanielFran is the PR alright, or is there anything I can do to get this merged?
@OmarHawk thanks for the information, I've added a test case to the sample so we can see the changes to the generated code. Let me know if the samples is incorrect. Once CI passes we can merge it.
Yes, that's a proper sample. When the mapstruct expression field is referenced as "label" for the relationship, jhipster does generate an application, but it fails to finally compile the java code. :-)
The PR doesn't change anything for the added sample: https://github.com/jhipster/generator-jhipster/actions/runs/3439427487/jobs/5738658441
Overview of the issue
To get a combined representation I use @MapstructExpression inside the .jdl file. The JDL looks like this:
When using @MapstructExpression the mapper is generated incorrectly resulting in the following error message:
This error message was also mentioned in the following issue: https://github.com/jhipster/generator-jhipster/issues/18589 But has not been resolved as far as I can see.
I suspect that this is a generation error of the mapper. I tested this inside a completely new JHipster project.
Related issues
(https://github.com/jhipster/generator-jhipster/issues/18589)
JHipster Version(s)
7.9.3
Entity configuration(s)
entityName.json
files generated in the.jhipster
directory.yo-rc.json file
Used JDL
Environment and Tools
openjdk version "17.0.2" 2022-01-18 OpenJDK Runtime Environment (build 17.0.2+8-86) OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
git version 2.34.1
node: v14.18.0
npm: 8.19.1
Docker version 20.10.11, build dea9396
docker-compose version 1.29.2, build 5becea4c
Browsers and Operating System
MacOS Monterey 12.5