Hello,
I'm using openjpa-2.0.0 and have some base class
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Base { ... }
and also some inheritors
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class A extends Base { ... }
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class B extends Base { ... }
Base class has some fields which are used as in A as in B class but these
fields are in separate tables (for A and B class) with no common table.
The problem is: if I have cached query involving A class and then I
create/update/delete object of B class then I get invalidated query for class A
because both A and B class have common persistent class Base and openjpa
decides that changing object of class B affects cached queries involving class
A which is not true (I have two separate tables - one for A and one for B
class).
This is significant problem for me because I have lots of inheritors of Base
class and all these inheritors have own table and don't have some common table
and these query cache invalidates slow system.
Is there any workaround? I tried extending QueryCache implementations but with
no success (for example removing Base class from access path of QueryKey object
didn't help because of some other realization details of QueryKey object which
I can't change)