I have an Entity which has an association to another Entity annotated with @Where, like so
public class EntityA {
@OneToMany
@Where(...)
private
I know its an old question but in case anyone look for an answer...
I had the same dilemma, you don't want to mess your code with "is_deleted= false" every where you select,
simple solution is to use native SQL:
lst = sessionFactory.getCurrentSession().
createSQLQuery("select {entb.*} from EntityB entb where is_deleted=1")
.addEntity("entb", EntityB.class)
.list();