ManyToMany and UI generation
pasqualebasile opened this issue · 2 comments
Hi,
I'm interested in UI generation when in JDL is present a ManyToMany
relationship. In this demo exists this specification:
relationship ManyToMany {
Post{tag(name)} to Tag{post}
}
The UI generated presents, in the Post view, a multiselect widget for selecting as many tags I want.
But, on the other side, in the Tag management view, there's no code generated for the post linked in the relationship.
Neverthless, after generate the application (without the Business Logic steps, and with fake data), and generate some relation between posts and tags, I obtain the following behaviour:
For the request http://localhost:8080/api/posts/1
, the response is:
{
"id": 1,
"title": "Singapore Pavia",
"content": "JHipster is a development platform to generate, develop and deploy Spring Boot + Angular / React / Vue Web applications and Spring microservices.",
"date": "2021-10-10T19:54:00Z",
"blog": {
"id": 1,
"name": "Integration",
"handle": "Avon Cambridgeshire"
},
"tags": [
{
"id": 1,
"name": "Branding back-end Sfida"
},
{
"id": 2,
"name": "Progetto composita Car"
}
]
}
On the other side, for the request http://localhost:8080/api/tags/1
:
{
"id": 1,
"name": "Branding back-end Sfida",
"posts": null
}
What is wrong? :-o
I believe this is "as designed" because Tag has a many-to-many relationship with Post. If you think this should be changed, please provide steps to reproduce, and your reasons for wanting this in JHipster's main issue tracker.
Thanks, @mraible,
I will try to write down some notes and steps in a couple of days.