title: Search nested object with spring data, Illegal attempt to dereference path source
body: <p>I use spring data jpa, I have these classe (each one have id... not displayed)</p>
  
  <pre><code>public class HOV{
  
      @ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST})
      @JoinColumn(name = "vehicle_type_id")
      private VehicleTypes vehicleType;
      ...
  }
  
  public class VehicleTypes{
  
      @OneToMany(mappedBy = "vehicleType")
      private List&lt;Vehicles&gt; vehicles = new ArrayList&lt;&gt;();
  
  }
  </code></pre>
  
  <p>so in hov repository, i tried to search by vehiclesId</p>
  
  <pre><code>List&lt;HOV&gt; findByVehicleTypeVehiclesId(Integer id);
  </code></pre>
  
  <blockquote>
    <p>Caused by: org.springframework.beans.factory.BeanCreationException: 
    Error creating bean with name 'hOVRepository': Invocation of init
    method failed; nested exception is java.lang.IllegalArgumentException:
    Failed to create query for method public abstract java.util.List
    com.lcm.repository.HOVRepository.findByVehicleTypeVehiclesId(java.lang.Integer)!
    Illegal attempt to dereference path source [null.vehicleType.vehicles]
    of basic type</p>
  </blockquote>