HHH-2808 CLONE -Impossible to define caching for a subclass's collection in hibernate.cgf.xml

This commit is contained in:
Strong Liu 2012-08-06 14:37:27 +08:00
parent 7bcdddfc88
commit 4cdf83d1be
1 changed files with 14 additions and 12 deletions

View File

@ -1341,18 +1341,7 @@ public class Configuration implements Serializable {
metadataSourceQueue.processMetadata( determineMetadataSourcePrecedence() );
}
// process cache queue
{
for ( CacheHolder holder : caches ) {
if ( holder.isClass ) {
applyCacheConcurrencyStrategy( holder );
}
else {
applyCollectionCacheConcurrencyStrategy( holder );
}
}
caches.clear();
}
try {
inSecondPass = true;
@ -1372,6 +1361,19 @@ public class Configuration implements Serializable {
throw ( RuntimeException ) e.getCause();
}
// process cache queue
{
for ( CacheHolder holder : caches ) {
if ( holder.isClass ) {
applyCacheConcurrencyStrategy( holder );
}
else {
applyCollectionCacheConcurrencyStrategy( holder );
}
}
caches.clear();
}
for ( Map.Entry<Table, List<UniqueConstraintHolder>> tableListEntry : uniqueConstraintHoldersByTable.entrySet() ) {
final Table table = tableListEntry.getKey();
final List<UniqueConstraintHolder> uniqueConstraints = tableListEntry.getValue();