I am using hibernate JPA.
I have a BasePersonnel class as super class that has a filter:
@Entity
@Table(name = "APP_PERSONEL")
@Filters({
@Filter(name = "authorize",
condition = " 1 = 1 ")
})
public class BasePersonel extends BaseEntity<Integer> {
...
}
and it has a child class:
@Entity
@Table(name = "RTS_PERSONNEL")
@Filters({
@Filter(name = "authorize",
condition = " 2 = 2 ")
})
public class Personnel extends BasePersonel {
...
}
When I run query on Personnel class using hql, both filters(ie super class's filter and child class's filter) append to where clause.
But I want just child class filter append to where clause.
Is there any solution to override super class filter?