I´m starting with Hibernate.
I have 2 tables in MySQL DB.
1)Unit
2)type: has as foreign key Unit_IdUnit I have also in type a column name "Period" VARCHAR
I want to create this query on HQL:
SELECT *
FROM unit
WHERE IdUnit not in(SELECT Unit_IdUnit
FROM type
WHERE Period='2016-09');
If I run this query in Mysql it´s working. But I can´t make it works on HQL.
How could I create this query to return a list of Unit?
This is my first question, so please let me know if you need further information