-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong name and type on findById generation #16531
Comments
This seems because of hardcoding in following instead of using Lines 138 to 144 in 67d1fa1
and Lines 150 to 154 in 67d1fa1
This should be fixed, will need to check what impact does it have. |
OK. I forked and made some changes. That worked! I'll do more tests and post the result. |
Would you like to do a pull request? :) |
Fixed some hard-coded references, but I've seen many others at tables join scripts. I'll keeping coding and fix what I have found. |
I think #16603 fixes this issue. |
Overview of the issue
When you specify a type other than "Long", the JDL utility overrides the method to "Long" instead of preserving the entered type.
Motivation for or Use Case
Since jhipster supports name definition for primary keys, the name provided must be in all generated code.
Note that some parts have the given name and others are not.
Reproduce the error
Create a jdl file with:
entity CategoriaServico {
@id codigo Long
descricao String required maxlength(50)
}
run
jhipster jdl src/main/resources/config/entities.jdl --force
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration
INFO! Using JHipster version installed locally in current project's node_modules
7.2.0
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.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
Entity configuration(s)
CategoriaServico.json
files generated in the.jhipster
directoryBrowsers and Operating System
The text was updated successfully, but these errors were encountered: