Joined: Wed Aug 27, 2003 7:31 am Posts: 9 Location: Russia, Izhevsk
|
Does on-delete="cascade" work with entity and collection caches?
For example, if we have object 'A', 'B' and 'C'. Objects 'B' and 'C' are members of one-to-many collection in 'A' with cascaded delete.
Now, suppose we have object 'C' in second-level cache and issue 'delete' statement on object 'A'. Database will delete objects 'B' and 'C'. But as far as I understand, Hibernate has no way to know about it so we might get inconsistent data if user tries to load object 'C' and hits the cache. Am I right?
_________________ Sapienti sat!
|
|