-
Notifications
You must be signed in to change notification settings - Fork 395
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
Implement ordered set accessors #140
Conversation
I'm not sure this patch fixes the problem. Try re-enabling the section in mogenerator/test/test.m that has the comment "Unforunately this section..." and running With the section enabled and without this patch, I'm seeing the old broken With your patch the insertion doesn't immediately raise an exception (yay!), but the relationship doesn't seem to be populated ( |
Sorry for the delayed response, I thought I'd go away and come back with an answer, but in reality I've not had the time. I ran the tests and saw the failure, and this has given me doubt about using ordered sets at all, because it likely explains what I was seeing in my project. Given deadlines, the solution I've used is to avoid using ordered sets. :-/ |
@danielctull No problem, we're all busy. Thanks for this and your previous patches. |
For reference, here's Graham Lee's workaround:
|
…' prototypes/bodies specifically for ordered relationships (issue rentzsch#140).
…' prototypes/bodies specifically for ordered relationships (issue rentzsch#140).
I think I may have got to the bottom of this. According to Apple's Key-Value Coding Programming Guide, for an ordered relationship we should not declare methods of the form |
rentzsch#140." This reverts commit 433ec8b.
The Apple generated accessors for ordered sets crash, this is described further in the radar bugs listed below.
I've added implementations for ordered to-many relationships, but because of Xcode will warn you about not implementing all the methods in a category, I've separated each relationship's accessor method declarations.
After two iterations of OS I would have thought they would have fixed this bug. :-/
Those radars:
http://openradar.appspot.com/10946479
http://openradar.appspot.com/12085926
http://openradar.appspot.com/11119497
http://openradar.appspot.com/12418689