Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Ordered child relationship fails in DataImport. #430

Closed
wants to merge 1 commit into from

3 participants

Craig Heneveld Joshua Greene Tony Arnold
Craig Heneveld

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

Craig Heneveld 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
Joshua Greene

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.

Joshua Greene

I've got a fix for it here:

#440

Cheers!

Tony Arnold
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!

Tony Arnold 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. Craig Heneveld

    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.
3  MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalDataImport.m
View
@@ -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.