ManyToMany relationship causes exceeding maximum allowed document nesting depth #26378
Closed
1 task done
Labels
Milestone
Overview of the issue
I have two entities with a ManyToMany relationship, defined like this in the JDL:
If I create a Post, and then a Tag, and associate the Tag with the Post, or vice versa (Tag created first, and Post associated with Tag), then the frontend will load indefinitely their lists.
Other entities still work fine, just these two are totally unusable. No ability to create new ones, view existing or modify them.
In the dev console in the browser, the following error is thrown when viewing either of their pages:
This is repeated hundreds of times more in the error.
Motivation for or Use Case
I'm investigating JHipster for use in a project, and was faced with this problem, which seems quite a severe one, as Many to Many relationships are to be used in the project, which makes it unusable.
Reproduce the error
When following the JHipster Mini Book, in the microservices section a JDL is provided.
I have slightly modified it (mostly to fix User relationship since 8.0 and removed the Kubernetes part), and ran the following command to create the project:
jhipster jdl apps.jdl --monorepository --workspaces
Then the following commands to deploy it Docker locally:
And finally, in the gateway folder run
npm run start
to get the frontend on port 9000.After, just login as admin, and try to create a Tag, and after that a Post, and associate that Post with that Tag on the creation process.
After this, both their pages will stop loading correctly.
Related issues
Suggest a Fix
JHipster Version(s)
8.5.0
JHipster configuration
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
.yo-rc.json file for gateway
.yo-rc.json file for blog
.yo-rc.json file for store
Environment and Tools
openjdk version "17.0.10" 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-17.0.10.7.1 (build 17.0.10+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.10.7.1 (build 17.0.10+7-LTS, mixed mode, sharing)
git version 2.39.3 (Apple Git-146)
node: v20.14.0
npm: 10.7.0
Docker version 26.1.1, build 4cf5afa
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
JDL definitions
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryPost.json
Tag.json
Browsers and Operating System
Mac OS X 14.5, tested in Microsoft Edge.
The text was updated successfully, but these errors were encountered: