Closed hmarchadour closed 3 years ago
A workaround : Use OneToMany and don't use bidirectional injected fields.
relationship OneToMany {
A to B{a}
}
Hi @hmarchadour, thanks for the feedback! So it's right that you cannot edit the field, due that a one to one relationship from a custom entity to the User entity, links your field with its primary key that is an autogenerated id (therefore not editable). Instead if you change the relationship with a OneToMany, you can choose a field that isn't a primary key.
The ticket can be considered resolved. So I close it. Thanks in advice for every question and contribution.
Describe the bug
A OneToOne relation produces a not editable field in entity UX.
To Reproduce Steps to reproduce the behavior:
http://localhost:9000/login
login withadmin/admin
http://localhost:9000/b
Create Bhttp://localhost:9000/a
Create A with a relation to the previous bExpected behavior The relation between A and B should exist.
Screenshots
Desktop (please complete the following information):
NHipster configuration
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
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 Nothing.