JTObjectMapping
JTObjectMapping copied to clipboard
Ignore certain keys
I'm using this on a NSManagedObject
subclass. It's trying to take an array of objects and set them on my object, but the property is an NSSet
. This results in the follow exception:
'Unacceptable type of value for to-many relationship: property = "inProgressSyllabi"; desired type = NSSet; given type = __NSArrayI;
@mwhuss Have you tried JTSetMappings? (Here's an example from the tests.)
I'm handling the creation and setting of those objects myself when doing a sync from the API. They're constructed from JSON and all the correct CoreData associations are setup. I'd much prefer a way to say "don't touch this key, I'll handle it".
It's also worth noting that I don't have this issue in v1.1.1
, it only started occurring in v1.1.2
.
v1.1.2 may have something to do with auto underscore mapping. Can you provide an example schema of your managed object and a sample JSON?