Hibernate version: 3.1rc2
I'm using query cache in an application that gets values from a view, but writes changes on tables.
The query of the view V1 is something like that:
SELECT A.SOMETHING, B.SOMETHING_ELSE FROM A, B WHERE ...
The problem rises when I try to use query cache. The UpdateTimestampsCache of V1 is never updated (obviously, as it's a read-only view), but I need it to be invalidated when A or B changes.
I can use an interceptor on classes mapped on A and B to invalidate V1 space when something gets inserted, deleted or updated, but it's not really a "general" solution.
There's a better way to do it? Someone on the Hibernate team planned to add the notion of dependency between multiple table/views?
Thank you.
|