Why do I get the "read-only cache configured for mutable" when building NHibernate session factory? -
i have set simple model: document entity multiple images. images saved in database, , updated other legacy application, app has readonly access. setup synonim can use images table on server local table. mappings following:
<class name="image" mutable="false" table="imageexternal"> <cache region="images" usage="read-only" /> <id name="id"> <generator class="assigned" /> </id> <property name="name" update="false" /> <!-- other properties --> </class> <class name="document" table="document"> <id name="id"> <generator class="guid.comb" /> </id> <!-- other properties --> <set name="images" mutable="false"> <cache region="images" usage="read-only" /> <key column="some_guid_column" /> <one-to-many class="image" /> </set> </class>
the image class mutable, can make immutable changing access strategy protected fields. set mutable="false" on image mapping, properties have update="false" , images set in parent relationship marked mutable="false". when building session factory "read-only cache configured mutable: images" warning because cache usage "read-only".
you're specifying mutable="false" , cache set. rid of that.
Comments
Post a Comment