Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Ordered child relationship fails in DataImport. #430

Closed
wants to merge 1 commit into from

3 participants

@cheneveld

DataImport was failing when a ordered one to many child relationship was being processed. Previously, the importer was calling (ex: relationship name was say videos) videosSet instead of just videos, fixed now and will just call videos

@cheneveld cheneveld DataImport was failing when a ordered one to many child relationship …
…was being processed. Previously, the importer was calling (ex: relationship name was say videos) videosSet instead of just videos, fixed now and will just call videos
e64b392
@JRG-Developer

The Good News: this fixes data import for NSOrderedSets! Awesome!

The Bad News: this appears to break setting the inverse relationship on the added object... : /

Ideas? I'm currently looking into a solution to fix this.

@JRG-Developer

I've got a fix for it here:

#440

Cheers!

@tonyarnold
Owner

Given the age of this issue, and the volume of issues we have to work through, I've decided to close this alongside a number of other older issues.

If you can still replicate the issue under the latest in-development version of MagicalRecord (3.0 at the time of writing), please feel free to re-open and one of @magicalpanda/team-magicalrecord will take another look. Thanks!

@tonyarnold tonyarnold closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 15, 2013
  1. @cheneveld

    DataImport was failing when a ordered one to many child relationship …

    cheneveld authored
    …was being processed. Previously, the importer was calling (ex: relationship name was say videos) videosSet instead of just videos, fixed now and will just call videos
This page is out of date. Refresh to see the latest.
View
3  MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalDataImport.m
@@ -101,8 +101,7 @@ - (void) MR_addObject:(NSManagedObject *)relatedObject forRelationship:(NSRelati
if ([relationshipInfo respondsToSelector:@selector(isOrdered)] && [relationshipInfo isOrdered])
{
//Need to get the ordered set
- NSString *selectorName = [[relationshipInfo name] stringByAppendingString:@"Set"];
- relationshipSource = [self performSelector:NSSelectorFromString(selectorName)];
+ relationshipSource = [self performSelector:NSSelectorFromString([relationshipInfo name])];
addRelationMessageFormat = @"addObject:";
}
}
Something went wrong with that request. Please try again.