I have a object which has second level cache enabled. This class has a 'Set' of child objects which also have second level cache enabled.
Now, if i issue a evict() on the parent object, will the child objects also be evicted from cache?
Following is the hbm mappings:
Code:
<class
name="com.abc.parent"
table="Parent"
>
[b]<cache usage="transactional"/>[/b]
<composite-id name="id" class="com.abc.parentId">
<key-property
name="id"
column="PARENT_ID"
>
</key-property>
<key-property
name="versionId"
column="PARENT_VERSION_ID"
>
</key-property>
</composite-id>
<set
name="children"
lazy="false"
inverse="true"
cascade="all-delete-orphan"
>
[b]<cache usage="transactional"/>[/b]
<key
>
<column
name="ID"
/>
<column
name="VERSION_ID"
/>
</key>
<one-to-many
class="com.abc.child"
/>
</set>
Thank you