Skip to content
Browse files

HHH-2808 CLONE -Impossible to define caching for a subclass's collect…

…ion in hibernate.cgf.xml
  • Loading branch information...
1 parent 1ec1254 commit 7f10972048ede7f06c4f18af7e5924b0d97e5eb5 @stliu stliu committed Aug 6, 2012
Showing with 14 additions and 12 deletions.
  1. +14 −12 hibernate-core/src/main/java/org/hibernate/cfg/Configuration.java
View
26 hibernate-core/src/main/java/org/hibernate/cfg/Configuration.java
@@ -1345,18 +1345,7 @@ protected void secondPassCompile() throws MappingException {
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 @@ protected void secondPassCompile() throws MappingException {
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();

0 comments on commit 7f10972

Please sign in to comment.
Something went wrong with that request. Please try again.