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:
parent
7ec8c11327
commit
46660fd045
|
@ -36,7 +36,7 @@ import org.hibernate.util.ReflectHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Adam Warski (adam at warski dot org)
|
* @author Adam Warski (adam at warski dot org)
|
||||||
* @author Hern<EFBFBD>n Chanfreau
|
* @author Hernán Chanfreau
|
||||||
*/
|
*/
|
||||||
public class EntityInstantiator {
|
public class EntityInstantiator {
|
||||||
private final AuditConfiguration verCfg;
|
private final AuditConfiguration verCfg;
|
||||||
|
@ -101,6 +101,9 @@ public class EntityInstantiator {
|
||||||
versionsReader, revision);
|
versionsReader, revision);
|
||||||
idMapper.mapToEntityFromMap(ret, originalId);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue