| The following situation is broken though, with this fix:
- using Hibernate 5.0.6 with ehcache;
- using custom regions by defining them in ehcache.xml (<cache name = "myRegion" ... />)
- annotating the entity classes with @Cache (... region="myRegion")
- entity class contains collections
The result is "org.hibernate.cache.ehcache.internal.nonstop.NonstopAwareEntityRegionAccessStrategy cannot be cast to org.hibernate.cache.spi.access.CollectionRegionAccessStrategy", because the method determineCollectionRegionAccessStrategy in SessionFactoryImpl finds a region with the name required, but it is an entity region, not a collection region. The same scenario works with 5.0.3. |