Hi,
I'm trying to use @JsonManagedReference and @JsonBackReference with an intermediate object in bewteen.
Let's say I have those 3 objects:
class Parent {
Bucket childrenBucket;
}
class Bucket {
@JsonManagedReference
List<Child> children;
}
class Child {
@JsonBackReference
Parent parent;
}
This is failing because of: "com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot handle managed/back reference 'defaultReference': back reference type (Parent) not compatible with managed type (Bucket)"
Is there a way to achieve this?
Thanks!