Special case of class migration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Special case of class migration

NorbertHartl
I have a class BaseClass that has two instVars 'one' and 'two'. Now I need to make a derived class DerivedClass from BaseClass. BaseClass has the instance variable 'one' and DerivedClass has instance variable 'two'. I'm looking for a migration scheme that works on that case.
I have it working by

- switching off auto migration
- creating the sub class DerivedClass
- moving instance variable 'two' from BaseClass to DerivedClass
- doing: BaseClass addNewVersion: DerivedClass
- doing: BaseClass migrateInstancesTo: DerivedClass

But I'm not sure if the tweak by adding the DerivedClass to BaseClass's history causes any trouble/side effects. Or is this to be done in a different way?

thanks,

Norbert