When serializing an instance of org.hibernate.proxy.map.MapProxy, all important state is lost (entityName, identifier).
As MapProxy claims to be serializable, id expect myMapProxyInstance.getEntityName() and .getIdentifier() to return the same result after serialization as it did before serialization.
Instead, both method will retrn always null after serialization.
This kills my chance of (re) loading the targetted entity after a proxy has been (for what reason ever) serialized and deserialized.
The reason seemes to be the fact that org.hibernate.proxy.AbstractLazyInitializer (super class of MapProxy.li) is not serializable. Thus all its' fields are transient, not only that explicitly transient AbstractLazyInitializer.session.
|