Datos básicos con colisiones de "Muchos a Muchos"

No puedo agregar datos con "relación de muchos a muchos"

Mi código

let cate2 = self.saveCategories(dict["categories"] as! Array, partyObject: party)//party is NSMAngedObjected Model let categories = party.mutableSetValueForKey("categories") categories.addObjectsFromArray(cate2) //categories is the many to many relationship between Party & Categories Entity 

Salida de debugging

 Printing description of cate2: ▿ 1 elements ▿ [0] : 1 elements - [0] : < apple.Categories: 0x7fbc6ad62dd0> (entity: Categories; id: 0x7fbc6ad62e80 <x-conetworkingata:///Categories/tE393C265-31D1-4E54-92DC-425C9FCB56493> ; data: { "category_Name" = 1; parties = ( ); //parties in the inverse relationship with Party Entity }) 2016-05-13 12:33:49.642 apple[6456:94286] -[_TtCs21_SwiftDefernetworkingNSArray entity]: unrecognized selector sent to instance 0x7fbc6ad68a40 2016-05-13 12:33:49.688 apple[6456:94286] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtCs21_SwiftDefernetworkingNSArray entity]: unrecognized selector sent to instance 0x7fbc6ad68a40 

Editar

 func saveCategories(arr_categories:[AnyObject],partyObject:Party) -> [AnyObject] { var categories_model = [Categories]() if(!arr_categories.isEmpty){ for categoryObject in arr_categories { let category = NSEntityDescription.insertNewObjectForEntityForName("Categories", inManagedObjectContext: appDelegate.managedObjectContext) as! Categories category.category_Name = String(categoryObject) //category.parties = partyObject //category.parties = [partyObject] categories_model.append(category) } return categories_model } return [] } 

Agregué el código para saveCategory.It devolverá la matriz de categorías nsmangedObject Model.

Ayúdame a resolver esto

Gracias,