Ignore Hibernate @Where annotation

Posted by Zecrates on Stack Overflow See other posts from Stack Overflow or by Zecrates
Published on 2010-02-22T13:32:26Z Indexed on 2010/03/26 11:33 UTC
Read the original article Hit count: 320

I have an Entity which has an association to another Entity annotated with @Where, like so

public class EntityA {

    @OneToMany
    @Where(...)
    private List<EntityB> entityBList;

}

Recently the inevitable has happened, I need to load EntityB's that don't conform to the @Where clause. I could remove the @Where annotation, but it is used a lot, so ideally I don't want to do that. Apart from loading the list of EntityB's manually, with another query, what are my options? Can I tell Hibernate to ignore the @Where annotation?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about annotations