+ (NSEntityDescription *) MR_entityDescriptionInContext:(NSManagedObjectContext *)context
{
// hah, not so fast :)
// it fails, of course
NSString *entityName = [[self new] entity].name; // or some preparations for name like module dot separation.
return [NSEntityDescription entityForName:entityName inManagedObjectContext:context];
}
See here:
+ (NSString *) MR_entityName;
{
NSString *entityName;
if ([self respondsToSelector:@selector(entityName)])
{
entityName = [self performSelector:@selector(entityName)];
}
if ([entityName length] == 0)
{
// Remove module prefix from Swift subclasses
// entity name and entity class could be different!
entityName = [NSStringFromClass(self) componentsSeparatedByString:@"."].lastObject;
}
return entityName;
}
It seems that configuration mapping
entity -> class
is unused.Could be fixed as this:
See here: