}
private Object getReplacement() {
final SessionImplementor session = getSession();
if ( isUninitialized() && session != null && session.isOpen()) {
final EntityKey key = session.generateEntityKey(
getIdentifier(),
session.getFactory().getEntityPersister( getEntityName() )
);
final Object entity = session.getPersistenceContext().getEntity(key);
if (entity!=null) setImplementation( entity );