FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

@JsonIgnore usage instead of @JsonManagedReference and @JsonBackReference #197

Closed ramazansakin closed 2 years ago

ramazansakin commented 2 years ago

Hi, I used @JsonManagedReference and @JsonBackReference first on my entities like:

image

and

image

and then when I try to add new airport, I got : image

But when I try to switch the references, it worked properly. Also, when I add @JsonIgnore annotation any of entity, it also worked properly. From all above, what is the purpose of exact usage of @JsonManagedReference and @JsonBackReference ?

Thanks

cowtowncoder commented 2 years ago

For usage question, please use either mailing lists:

or git chatter:

Second: your question seems to be through another framework (and annotations) which may change handling. It would probably be necessary to try to use annotations and read/write with only Jackson annotations to isolate the issue. Or maybe reach to to Spring users' help forums first.