title: Spring Crud Repository Custom left join query
body: <p>I am developing Spring boot project with spring data jpa.</p>
  
  <p>I have two entities with one to many relation.</p>
  
  <p>Beds and Allocations</p>
  
  <pre><code>class Allocations(){
  ....
  
   @ManyToOne
       @JoinColumn(name="bedId" , nullable=true)
        private Beds beds;
  .....
  }
  
  class Beds(){
  ....
  @OneToMany(mappedBy="beds")
       @JsonIgnore
       private List&lt;Allocations&gt; allocations;
  ....
  }
  </code></pre>
  
  <p>In Allocations repository when i do findAll() , i am able to get all the allocations with bedID.</p>
  
  <p>But i want to find all the Beds which are not allocated . </p>
  
  <p>Would like to perform left join on beds.</p>
  
  <pre><code>@Query("Select a from Beds b left join Allocations a on a.beds.bedID = b.bedId ")
      public List&lt;Allocations&gt; findtest(); 
  </code></pre>
  
  <p>How to perform the above activity .</p>
  
  <p>Also i cant do findall() on beds as it will not give me the values of Allocations table.</p>
  
  <p>Earlier i was using @jsonback/managedreferences annotation to find all the beds along with their allocations , But when i was adding a new allocations i was getting json managed reference errors  , so i used @Jsonignore annotation .</p>
  
  <p>Please suggest the required solution</p>