I added a data member to a class that had a Serialize() function. The Serialize() function didn't support versioning. Now I want to serialize the new data member but to be compatible with previous serializaions.
My class has DECLARE_SERIAL(...) and IMPLEMENT_SERIAL(...,...,VERSIONABLE_SCHEMA|1) but when I use the function CArchive::GetObjectSchema() I always get -1.
I can't distinguish between old versions and new ones.
The class I serialize is an item in a CMap object that I serialize in another class.
How can I distinguish the different versions?