BigMemory Go 4.3.4 | Product Documentation | BigMemory Go Integrations | Using BigMemory Go with Hibernate | Configuring ehcache.xml Settings | Ehcache Settings for Collections
Ehcache Settings for Collections
Hibernate creates collection cache names based on the fully qualified name of the Domain Object followed by "." and the collection field name. For example, a Country domain object has a set of advancedSearchFacilities. The Hibernate doclet for the accessor looks like this:
* Returns the advanced search facilities that should appear for this country.
* @hibernate.set cascade="all" inverse="true"
* @hibernate.collection-key column="COUNTRY_ID"
* @hibernate.collection-one-to-many class=""
* @hibernate.cache usage="read-write"
public Set getAdvancedSearchFacilities() {
return advancedSearchFacilities;
You need an additional cache configured for the set. The ehcache.xml configuration looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<cache name="com.somecompany.someproject.domain.Country"
<persistence strategy="localTempSwap"/>
<persistence strategy="localTempSwap"/>
Hibernate CacheConcurrencyStrategy for Collections
The read-write, nonstrict-read-write and read-only policies apply to Domain Object collections.

Copyright © 2010 - 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release