[Glass] Grrrr cannot migrate (class rename with subclasses and with a name of a deleted class)

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Wed Aug 26 15:16:14 PDT 2015


Hi guys,

Sorry to bother again but I really can't migrate. I tried everything,
nothing worked. I admit I have a weird scenario, but still.

- I have a class FaSecurityClosingPriceRecord which has no instance nor
subclasses.
- I have a separate class called FaSecurityClosingPriceRecord2 (yes, don't
ask please) which a special superclass and also have 2 subclasses (this is
a different hierarchy than  than FaSecurityClosingPriceRecord). Both
subclasses do have instances.

So...what I need to do is remove old class FaSecurityClosingPriceRecord and
rename FaSecurityClosingPriceRecord2 to FaSecurityClosingPriceRecord. And
of course, migrating the sub instances.  I tried the following (in order)

1) First monticello commit only the removal of
FaSecurityClosingPriceRecord. Then upload code, commit and #doBulkMigrate.

2) Monticello commit where I rename FaSecurityClosingPriceRecord2 to
FaSecurityClosingPriceRecord (so subclasses now are subclass of
FaSecurityClosingPriceRecord). And I made a copy of
FaSecurityClosingPriceRecord and call it FaSecurityClosingPriceRecord2. So
to sum up, I have both classes (being equal) FaSecurityClosingPriceRecord
and FaSecurityClosingPriceRecord2 and just that
FaSecurityClosingPriceRecord is the one that has the subclasses.

3) Then I tried something like:

FaSecurityClosingPriceRecord2 addNewVersion:
FaSecurityClosingPriceRecord. System
commit.
FaSecurityClosingPriceRecord2 migrateInstancesTo:
FaSecurityClosingPriceRecord.
FaSecurityClosingPriceRecord2 removeFromSystem.

But that didn't work at all.

So...how should be the steps I can do to make this refactor/migration? I
found no example of classes with subclasses and renaming one in the middle
of hierarchy in the guide, so I wonder if this is a special case or not.

Thanks in advance!


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150826/a847dd1d/attachment.html>


More information about the Glass mailing list