SERIALIZE_IDENTIFIER_FOR_LAZY_NOT_LOADED_OBJECTS

When you activate this option, the proxy object serializes it's ID
instead of null

hibernate4 version