I don't have much hope, just trying to find workaround:
there are 2 classes, Vendor(parent) and User(child). Vendor has collection of Users, User knows about Vendor. Collection of Users is mapped using inverse="true". All of these are in 2nd level EHCache: Vendor, Vendor.users, User, User.vendor.
Now, I add new user and associate them with Vendor like: user.setVendor(someVendor). Then, I update user. Because users are mapped inverse, all these are ok. But, Vendor.users collection which is in 2nd level cache isn't updated/invalidated. So, until cache expires, vendor doesn't know new user has been added to him.
Is there any way to manage this issue?
|