I have a complex object, with fields and reference to database that I would like to pass as serialized object. I implemented the interface, but on the other hand it doesn't work out, and get unexpected errors.
What I would like to do, is before serialization to tell that only the ID is serialized, and after on deserialization to get back the ID and reconstruct the item more easily.
In order to help for a code, I have
setId();
getId();
and Load() methods
I would like to be done inside by Object.
How can this be done?