i want to serailize & deserialized hibernate object. Can anybody tell me how can i achieve this?
Thanks
you can use SerializationHelper
utility provided by hibernate, clone will do job for you. but if you want to save as new entity then make sure you reset id and version properties.
one typical requirement i have used this to achive snapshot of current state of entity object, refer to my answer in post
Example:
Entity object=SerializationHelper.clone(<Entity Object>);
This method will create clone (new object) by first serializing and then deserializing.