title: One To Many will fatch all the child records ignoring the where condition in criteria
body: <p>I have a One to Many relation in Hibernate.Say Report and Projects table.One report  has many projects and projects can be in Active or Inactive state.I need to fetch all the reports with Active projects.   </p>
  
  <pre><code>Class Report{
      @OneToMany(mappedby="reports")
      List&lt;Projects&gt; projList;
      /*get and set methods */    
  } 
  
  Class Project{        
      @ManyToOne
      Report repors;
      /*get and set methods */        
      /*This is a column which represenst ACTIVE or NOT*/
      private status;
  }        
  </code></pre>
  
  <p>I am trying to pull all the reports with active project and my criteria goes something like this:    </p>
  
  <pre><code>List&lt;Reports&gt; reportsList = Criteria(Reports.class)
        .createAlias("projList","projList",INNER_JOIN)
        .add(Restrictions.eq("projList.status","ACTIVE")).list()
  </code></pre>
  
  <p>When I iterate through the reportsList and get the corresponding projects it is returning me all the project irrespective of ACTIVE or INACTIVE.</p>
  
  <pre><code>for(Report rep:reportsList){
    rep.getProjList(); 
    //This is returning me all the projects irresective of my criteria for 
   // ACTIVE projects. This is hitting another query to the table with the report id 
   //only but not with the status= ACTIVE.So this is returning me all the Projects.
  } 
  </code></pre>
  
  <p>But when I do a LEFT OUTER JOIN instead of INNER JOIN I am receiving the correct result i.e. only ACTIVE Project. I am not sure why?</p>
  
  <p>Can you please explain me how and is it correct and it will be consitent in all scenarios?
  or should I load the ACTIVE projects and get the corresponding Report for that 
  i.e. having criteria on Projects (From Child to Parent)                                                   </p>