-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Ordered Sets Data Import and KVC Issues #440
Fix for Ordered Sets Data Import and KVC Issues #440
Conversation
…s, this code invokes the appropriate access and change notifications on self, which is required for Core Data to correctly set the inverse relationship on the related object
👍 Did the same just right now. |
{ | ||
MRLog(@"Adding object for relationship failed: %@\n", relationshipInfo); | ||
MRLog(@"relatedObject.entity %@", [relatedObject entity]); | ||
MRLog(@"relationshipInfo.destinationEntity %@", [relationshipInfo destinationEntity]); | ||
MRLog(@"Add Relationship Selector: %@", addRelatedObjectToSetMessage); | ||
MRLog(@"Add Relationship Selector: %@", addRelatedObjectToSetMessage); | ||
MRLog(@"perform selector error: %@", exception); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is incorrect. We have no exception
variable anymore.
Hi, I've tried your patch and it solved my problem. I was wondering why it wasn't merged in MR, I'm currently using version 2.2 (from CocoaPods), but also the current developer branch has no trace of your patch. Why did you close this issue? Did you find an alternative solution? Thank you. |
I don't remember why I closed this exactly... it may be because there are several competing pulls pending? Or it didn't match up with the latest dev branch...? Either way, I don't think this pull request has any chance of ever being pulled into the main repo. Mainly because
I was lazy, however, and didn't want to go back and rewrite all of my code to use these properties. So instead, I created a patch that adds "fixed" methods for ordered sets to the computer-version of the generated models. See this pull request: For me, this is a better solution than having this "fix" included in MagicalRecord... mogenerator was designed to make CoreData work better than the junk Apple provides by default, so I think it's more appropriate that the fix go there for this. For these reasons, I am leaving this pull request closed. |
Hi @JRG-Developer, |
Building on @cheneveld 's solution to fix data import for ordered sets, this code invokes the appropriate access and change notifications on self, which is required for Core Data to correctly set the inverse relationship on the related object