Does Hibernate use the cache for a parent entity if there is no explicit cache for a child entity of the parent? For example, say I have the following.
Code:
package test;
@Entity
public class Parent {
}
@Entity
public class Child extends Parent {
}
<hibernate-configuration>
<session-factory>
...
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
...
<!-- Hibernate Secondary Cache -->
<class-cache class="test.Parent" usage="read-write"/>
...
Will Hibernate use the test.Parent cache to cache instances of test.Child, or must I explicitly enumerate all the caches for subclasses in the hierarchy? Note the use_second_level_cache property is false.
I am using Hibernate 3.2 with Ehcache 1.3.
Thanks in advance.