Krish
Krish

Reputation: 2002

Is there any way to use JsonManagedReference and JsonBackReference in both directions?

I am able to serialize from Child to Parent (JsonManagedReference -> JsonBackReference) but its not working for Parent -> child.

Is there any way to do that ?

I also tried with the JsonIdentityInfo. Here, I am unable to deserialize Json that contain 2 objects with the same ID. I have created a question:

Unable to deserialize JSON with same ID

Upvotes: 0

Views: 584

Answers (1)

Krish
Krish

Reputation: 2002

After a lot of tries, implemented the traversing bi-directional with @JsonIgnoreProperties

example: "@JsonIgnoreProperties(allowSetters = true, value = { "enterprise" })"

Upvotes: 1

Related Questions