RLMMigration Class Reference
Inherits from | NSObject |
Declared in | RLMMigration.h RLMMigration.mm |
Overview
RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version of an RLMRealm instance.
This object provides access to the RLMSchema current to this migration.
Properties
Instance Methods
enumerateObjects:block:
Enumerates objects of a given type in this Realm, providing both the old and new versions of each object. Objects properties can be accessed using keyed subscripting.
- (void)enumerateObjects:(NSString *)className block:(RLMObjectMigrationBlock)block
Parameters
- className
The name of the RLMObject subclass to retrieve on eg.
MyClass.className
.
Discussion
Warning: All objects returned are of a type specific to the current migration and should not be casted to className. Instead you should access them as RLMObjects and use keyed subscripting to access properties.
Declared In
RLMMigration.h