LazyInitializationException in ToOneIdMapper when attempting to initialize Hibernate proxy.
Description
In ToOneIdMapper.mapToMapFromEntity() Hibernate proxy initialization is attempted using session which was originally used for loading that entity. However, by that time, that session could be closed (and reference to it could be removed from lazy initializer instance). Attached test case demonstrates such a scenario.
In ToOneIdMapper.mapToMapFromEntity() Hibernate proxy initialization is attempted using session which was originally used for loading that entity. However, by that time, that session could be closed (and reference to it could be removed from lazy initializer instance). Attached test case demonstrates such a scenario.