title: Jackson Serialization One to Many Relationships
body: <pre><code>@OneToMany(mappedBy = "departments")
  @JsonManagedReference
  private List&lt;Employees&gt; employeesList; 
  
  @ManyToOne
  @JoinColumn(name = "department_id")
  @JsonBackReference
  private Departments departments;
  </code></pre>
  
  <p>I have two Entities, Employees and Departments. Each Employee belongs to a Department.
  I used the @JsonManagedReference and @JsonBackReference to avoid infinite recursion.</p>
  
  <p>But I cannot get Department of Employee from the Employee side as it gets ignored.
  In Laravel I could establish bidirectional relationships to get two way data. </p>
  
  <p><strong>What is the best way to implement and get bidirectional data when using Jackson for Spring? I want to know which department an employee is in from the employee side.</strong></p>