I'm trying to configure a a cached read only item that has a cached collection property (also read only).
Here is my mapping:
Code:
<class name="my.Parent" mutable="false" table="parent">
<cache usage="read-only"/>
<id name="id" column="id" type="long">
<generator class="sequence">
<param name="sequence">parent_seq</param>
</generator>
</id>
<set name="children" table="parent_child" lazy="true">
<cache usage="read-only"/>
<key column="parent_id"/>
<many-to-many column="child_id" class="my.Child"/>
</set>
</class
And here is the warning:
Code:
WARN 2005-07-13 16:28:56,559 org.hibernate.cache.CacheFactory - read-only cache configured for mutable class: my.Parent.children
Is it possible to mark a collection as immutable? Is a read-only cache for "children" a bad idea? Should I just bite the bullet and change the cache usage?
thanks for any ideas