Resolving HHH-5588: Improve support for entityNames in envers.

When instantiating an historic entity, envers put its entityName on the cache for future uses.
This commit is contained in:
Hernan 2010-11-15 00:16:04 -02:00 committed by adamw
parent 7ec8c11327
commit 46660fd045
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,7 @@ import org.hibernate.util.ReflectHelper;
/**
* @author Adam Warski (adam at warski dot org)
* @author Hern<EFBFBD>n Chanfreau
* @author Hern&aacute;n Chanfreau
*/
public class EntityInstantiator {
private final AuditConfiguration verCfg;
@ -101,6 +101,9 @@ public class EntityInstantiator {
versionsReader, revision);
idMapper.mapToEntityFromMap(ret, originalId);
// Put entity on entityName cache after mapping it from the map representation
versionsReader.getFirstLevelCache().putOnEntityNameCache(primaryKey, revision, ret, entityName);
return ret;
}