rentzsch/mogenerator — Issue #75: Can't add object to ordered set
Author: pip8786
Created: 2011-11-14 07:31:16+00:00
State: open

My VectorLayer object has an ordered to-many relationship to VectorStroke named strokes. I cannot seem to add a VectorStroke to my VectorLayer without it crashing.

I've tried adding a VectorStroke to the VectorLayer directly with the following results:
[vectorLayer addStrokesObject:vectorStroke];

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSSet intersectsSet:]: set argument is not an NSSet'

And I've tried using the strokesSet property and got the following results:
[vectorLayer.strokesSet addObject:vectorStroke];

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSManagedObjects of entity 'VectorLayer' do not support -mutableSetValueForKey: for the property 'strokes''

Am I doing something wrong or is this a bug?