I have a Spring Boot project which has multiple Model class
I want to use multiple model classes in my DAO implementation.
Can someone please explain how can I use HQL queries here.
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).
Secondly using CRUDRepository limits me to very specific methods. But HQL queries I need could be more complex like:
Query query = session.createQuery(from Employee where name=:name and place=:place and phone=:phone and gender=:gender);
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.