How to map OneToOne relationship between POJOs using @JsonManagedReference and @JsonBackReference

Viewed 17259

I have read

looking for solutions to map One-To-One relationships. However, those demos in the articles are all Many-To-One or One-To-Many. From the demo, I conclude that in most cases, we will annotate the ONE side as @JsonManagedReference and the MANY side as @JsonBackReference.

However, there's no hint about how to map One-To-One. Do you have any idea?

Also, what if it is a bi-directional one-to-one?

1 Answers
Related