FasterXML/jackson-datatype-hibernate — pull request #56 by arthupka (2014-07-21 19:07:17+00:00)
Title: Entity class instance as identifier instead of HashMap

I've implemented a Feature 'SERIALIZE_IDENTIFIER_USE_PERSISTENT_CLASS' that allows to configure if HibernateProxySerializer should instantiate the actual Entity class and set the Id value in case SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS is set to true.
This is especially useful in cases where Type inheritance is used with Jackson (@JsonTypeInfo).
This feature defaults to false and can optionally be enabled in case SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS is enabled.

Without this feature the type information is lost for the client i.e. HashMap is returned as type info.