itsniper / FTASync

Allows you to sync CoreData entities with a Parse backend.
MIT License
311 stars 59 forks source link

Fix CoreData bug using generated accessor methods #4

Closed Laeger closed 11 years ago

Laeger commented 12 years ago

I adjusted the selector used in FTASyncParent.m to instead use addObject: to an NSMutableOrderedSet versus using the pre-generated accessors as I was getting the CoreData bug seen here: http://stackoverflow.com/questions/7385439/exception-thrown-in-nsorderedset-generated-accessors

I am using a mix of unordered and ordered relationships and I have not had an issue with this.

Finally, I have not had to adjust the selector for the remove pre-generated accessor.

Laeger commented 12 years ago

I am now seeing the error for the -remove selector as well and have since modified it to also reference the NSMutableOrderedSet instead of the generated accessor.

itsniper commented 12 years ago

Awesome thanks! I'm at Startup Weekend Denver right now, but I'll try and get to this next weekend.

Laeger commented 11 years ago

Thanks Justin.

Also I was getting an error with the lines:

            else {
                FSALog(@"%@ entity does not respond to selector: %@", [[self entity] name], selector);
            }

because SEL selector is not an id. If you change "selector" to "NSStringFromSelector(selector)", the error goes away.

Thanks again, Aaron