title: @Where clause does not work inside hibernate join query
body: <p>I have 2 entities with @Where annotation. First one is Category;</p>
  
  <pre><code>@Where(clause = "DELETED = '0'")
  public class Category extends AbstractEntity
  </code></pre>
  
  <p>and it has the following relation;</p>
  
  <pre><code>@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "category")
  private Set&lt;SubCategory&gt; subCategories = Sets.newHashSet();
  </code></pre>
  
  <p>and second entity is SubCategory;</p>
  
  <pre><code>@Where(clause = "DELETED = '0'")
  public class SubCategory  extends AbstractEntity
  </code></pre>
  
  <p>and contains corresponding relation;</p>
  
  <pre><code>@ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "CATEGORY_ID")
  private Category category;
  </code></pre>
  
  <p>Whenever I call the following Dao method;</p>
  
  <pre><code>@Query(value = "select distinct category from Category category join fetch category.subCategories subcategories")
  public List&lt;Category&gt; findAllCategories();
  </code></pre>
  
  <p>I got the following sql query;</p>
  
  <pre><code>    select
          distinct category0_.id as id1_3_0_,
          subcategor1_.id as id1_16_1_,
          category0_.create_time as create2_3_0_,
          category0_.create_user as create3_3_0_,
          category0_.create_userip as create4_3_0_,
          category0_.deleted as deleted5_3_0_,
          category0_.update_time as update6_3_0_,
          category0_.update_user as update7_3_0_,
          category0_.update_userip as update8_3_0_,
          category0_.version as version9_3_0_,
          category0_.name as name10_3_0_,
          subcategor1_.create_time as create2_16_1_,
          subcategor1_.create_user as create3_16_1_,
          subcategor1_.create_userip as create4_16_1_,
          subcategor1_.deleted as deleted5_16_1_,
          subcategor1_.update_time as update6_16_1_,
          subcategor1_.update_user as update7_16_1_,
          subcategor1_.update_userip as update8_16_1_,
          subcategor1_.version as version9_16_1_,
          subcategor1_.category_id as categor11_16_1_,
          subcategor1_.name as name10_16_1_,
          subcategor1_.category_id as categor11_3_0__,
          subcategor1_.id as id1_16_0__ 
      from
          PUBLIC.t_category category0_ 
      inner join
          PUBLIC.t_sub_category subcategor1_ 
              on category0_.id=subcategor1_.category_id 
      where
          (
              category0_.DELETED = '0' 
          )
  </code></pre>
  
  <p>Could you please tell me why the above query lacks</p>
  
  <blockquote>
    <p>and subcategor1_.DELETED = '0' </p>
  </blockquote>
  
  <p>inside its where block?</p>