Problem caching / deleting NHibernate?

I am using NHibernate and have a cache area specified in my NHibernate configuration:

<cache region="HalfHour" expiration="1800" priority="3" />

I have an entity definition ( UserDefinedGroup) that is configured to use this cache area in read-write mode:

<class name="UserDefinedGroup" table="Message_Groups">
    <cache region="HalfHour" usage="read-write" />
    ...
</class>

I also have an HQL query that is configured to use a query cache, as it returns a large number of UserDefinedGroup instances:

var results = Session.CreateQuery("from UserDefinedGroup order by Name")
                .SetCacheable(true)
                .SetCacheRegion("HalfHour")
                .List<UserDefinedGroup>();

However, when I try to delete an instance UserDefinedGroup, I get the following error, even if the object is configured to use read / write cache.

ReadOnlyCache: Unable to write readonly Cristal.Model.UserDefinedGroups.UserDefinedGroup object

NHibernate? , , , , .

+5
1

? , , ? .

+4

All Articles