Closed Rapster closed 10 months ago
This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days
Overview of the issue
@JsonIgnoreProperties
is generated to prevent circular references which is good, but gets generated while there is no need to itMotivation for or Use Case
Since there is no risk of circular references, no need to have this annotation on certain entities
Reproduce the error
Considering the jdl file:
JDL definitions
A
entity looks like this:C
does not referenceA
, neitherC
toB
and yet it's being ignored for no reason.Suggest a Fix
Problem comes from here:
The condition is not quite right, and can't say it's easy to fix... It gets really tricky if I had a
D
referencesA
: because we get a circular reference a this point... Any way to ignore subproperties, so whenever we decide to serializeA
it won't try to serializeD
, something like:I'm confused with all the ways to solve circular references in jackson: https://www.baeldung.com/jackson-bidirectional-relationships-and-infinite-recursion
JHipster Version(s)
7.8.1
Browsers and Operating System