mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
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 @@
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern<EFBFBD>n Chanfreau
|
||||
* @author Hernán Chanfreau
|
||||
*/
|
||||
public class EntityInstantiator {
|
||||
private final AuditConfiguration verCfg;
|
||||
@ -101,6 +101,9 @@ public Object createInstanceFromVersionsEntity(String entityName, Map versionsEn
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user