I just want to check really quickly. Say I have two entities in a data model: Catalog, and Product. They have a many-to-many relationship with each other, and both are require
Swift translation of Andy and JosephH
override func willSave() { super.willSave() if self.deleted { return } if self.products.count == 0 { self.managedObjectContext?.deleteObject(self) } }