core data - Swift NSManagedObjects do not support mutableSetValueForKey -


i practicing tute task on swift coredata. reminder app, have these entities in core data file:

and error in viewdidload() function:

var reminderlist: nsmutablearray  //in viewdidload() {     super.viewdidload()      //fetchrequest code blocks      self.reminderlist = nsmutablearray(array: (currentreminders?.members?.allobjects) as! [reminder]) 

i got error message: 'nsmanagedobjects of entity 'reminderlist' not support -mutablesetvalueforkey: property 'members'' , app crashed.

this problem because of mistake in setting relationship between entities in coredata. check see if constraints set to-one/many.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -