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 1ec1254bab
commit 7f10972048
1 changed files with 14 additions and 12 deletions

View File

@ -1345,18 +1345,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;
@ -1376,6 +1365,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();