title: using HQL queries in Spring Boot
body: <p>I have a Spring Boot project which has multiple Model class </p>
  
  <p>I want to use multiple model classes in my DAO implementation.</p>
  
  <p>Can someone please explain how can I use HQL queries here.</p>
  
  <p>Most of the examples i saw uses CRUDRepository. But in my understanding this limits us to one model class (please correct me if my understanding is wrong). </p>
  
  <p>Secondly using CRUDRepository limits me to very specific methods. But HQL queries I need could be more complex like:</p>
  
  <pre><code>Query query = session.createQuery(from Employee where name=:name and place=:place and phone=:phone and gender=:gender);
  </code></pre>
  
  <p>Is it standard practice to use CRUDRepository even for HQL queries like this.
  Otherwise how can I use such HQL queries. (If possible please also add what all dependencies and annotations i will need to add). I am using Hibernate and postgres.</p>