[Glass] Migration of instances ...
itlists@schrievkrom.de via Glass
glass at lists.gemtalksystems.com
Thu May 21 22:22:30 PDT 2015
Hello Dale,
that means,
* that MCPlatformSupport class>>autoMigrate also works for topaz
imported code ?
But then: how do I add a method like "migrateFrom: oldPoint instVarMap:
aMap" which is oriented towards the "new" class design - but can only
compiled when the new class definition is available.
But when the new class definition is recognized (during import) the
migration is started - but then the method mentioned above is not
available yet.
Therefore it seems for me, that when importing pure-source code via
topaz I have to switch off auto migration and manually add source code
to do migration after ALL source code has been imported ...
Or I use
doit
GsDeployer bulkMigrate: [
/* creation code for new class shape definitions */
PUMGeneralDomainObject subclass: 'CATIEnumAddressState'
instVarNames: #( )
classVars: #( )
classInstVars: #( )
poolDictionaries: #( )
inDictionary: 'UserGlobals'
category: 'GessCATIProject'
options: #( ).
and further class definitions ..
/* in addition all codes needed for migration - not possible !? */
].
%
but in this example I can not add source code for methods ... therefore
doing it manually seems to be the only way ...
Marten
Am 22.05.2015 um 02:58 schrieb Dale Henrichs via Glass:
> Marten,
>
> If MCPlatformSupport class>>autoMigrate is true, then automatic
> migration of instances is performed for each of the classes modified ...
> the migrations are performed after the shape of the class is changed, so
> there can be several migrations sweeps if you are changing a superclass ...
>
> You can use GsDeployer class>>bulkMigrate: to defer instance migration
> until the block is finished, which means that you'll make one pass to
> migrate instances of all of the classes changed during the execution of
> the block ... For most cases I recommend that you wrap all of your loads
> with this expression to save on migration costs ...
>
> By default, MCPlatformSupport class>>autoMigrate is off ... so when you
> do things in topaz, automatic migration is not turned on ... one of the
> reasons I recommend that GsDeployer class>>bulkMigrate: for all loads ...
>
> In GemTools automatic migration is turned on at login time. Not sure
> what happens in Jade.
>
> Questions?
>
> Dale
>
> On 05/21/2015 12:55 PM, itlists at schrievkrom.de via Glass wrote:
>> Hey,
>>
>> I would like to know, how migration of instances to new class versions
>> is actually automatically triggered - in case
>>
>> * when I import a Monticello package
>>
>> or
>>
>> * when I import source code via topaz.
>>
>> I've seen something like "MCPlatformSupport autoMigrate: true" - but how
>> does it work ?
>>
>>
>> Thanks,
>>
>> Marten
>>
>>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
--
Marten Feldtmann
More information about the Glass
mailing list