-
Notifications
You must be signed in to change notification settings - Fork 82
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
A relation OneToOne from a custom entity to the User entity together other OneToMany relationships throw an error #195
Comments
I have tried to replicate your issue with my jdl on https://github.com/jhipster/generator-jhipster-nodejs/blob/feature/user-onetomany-issue195/test-integration/samples/microservice-oauth2-jdl/microservice-oauth2-jdl.jdl . So I have a lot of OneToMany relationship and a OneToOne for the ShopUser and User entity. |
Thanks for your feedback. Interesting... Have you any diff in node/yeoman...? |
This is a generation behavior, I think to the yeoman release. I will try with https://github.com/jhipster/generator-jhipster-nodejs/blob/feature/user-onetomany-issue195/test-integration/samples/microservice-oauth2-jdl/microservice-oauth2-jdl.jdl ;) |
Thanks! |
If I'm right, I don't find any relation OneToMany from ShopUser to another entity in https://github.com/jhipster/generator-jhipster-nodejs/blob/feature/user-onetomany-issue195/test-integration/samples/microservice-oauth2-jdl/microservice-oauth2-jdl.jdl
To test my use case, I add a meaningless relation from ShopUser to Product :
After a
|
server/src/domain/shop-user.entity.ts
|
JHipster Version(s)
JHipster configuration, a
|
Yes, thanks for the feedback, I have performed the fix!!
|
Note: the only way that I've found to deal with an user relation :
|
Yes, the bug was only in the OneToMany |
Describe the bug
As soon as an entity "bind" the User entity thanks to a OneToOne relation, all OneToMany relation are generated without the other annotation property.
To Reproduce
Steps to reproduce the behavior:
in ./server/src/domain/a.entity.ts
Expected behavior
in ./server/src/domain/a.entity.ts
Screenshots
Desktop (please complete the following information):
NHipster configuration
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
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
git version 2.19.0
node: v14.15.3
npm: 6.14.9
yeoman: 3.1.1
yarn: 1.22.10
Docker version 19.03.13, build 4484c46d9d
docker-compose version 1.27.4, build 40524192
Additional context
Noting
The text was updated successfully, but these errors were encountered: