I have a sample code like this -
@Entity @Table(name = "employee") @Where(clause = "active IS TRUE") public class Employee{ }
This will retrieve all records of the employee table with active = true or 1. In some cases, it may be necessary for me to want to load records with active = false or 0.
If I write my code as FROM Employee emp WHERE emp.active IS FALSE , but the generated query contains bot conditions specified in HQL and Annotations.
Therefore, the expected results do not come. Is there a way to override this predefined @Where specific object?
source share