Guidance on modifying class definitions and switching my application to the new definitions
Hello,
I have a property which I need to move from one class definition to another as follows:
Old definition:
Class SCHED.SchedEntry
{
Property Experiment as %String;
Property ScanSlot as list of TracerEntry;
}
Class SCHED.TracerEntry
{
Property Tracer As %String
}
I want to move the Experiment property to the TracerEntry class so that there is a different Experiment allowed for each ScanSlot, like this:
Class SCHED.SchedEntry
{
Property ScanSlot as list of TracerEntry;
}
Class SCHED.TracerEntry
{
Property Tracer As %String;
Property Experiment As %String;
}
We already have an application running on our production system using the old class definitions, which contains a lot of data.
What are the best practices for updating the development system with the new definitions and migrating the data? It seems to me that if I compile the new classes, I will no longer be able to access the Experiment property in the SchedEntry class.
suggested steps:
#1)Add Property Experiment As %String; to Class SCHED.TracerEntry
#2) Write a Utility Class to move the existing content from SCHED.SchedEntry.Experiment in to the all List entries.
#3)
If you are satisfied and all methods access the new location of Experiment
You may remove all old content of SCHED.SchedEntry.Experiment . Set it to ""
and set the property to INTERNAL, PRIVATE or just delete SCHED.SchedEntry.Experiment . BUT don't touch the storage map!
This is not a necessary step but just kind of clean up.
Thank you!