So i'm developing a workout tracker application and i have one entity which has all the exercises and another which will have saved workouts. I have setup a many-to-many relationship between the two as a workout can have many exercises and an exercise could have many workouts. I've subclassed my entities and i've been given these two variables... 

```
// Workout Entity...
@NSManaged public var exercises: NSSet?

// Exercises Entity...
@NSManaged public var workouts: NSSet?

```

And i'm confused on how to write data to them. I have setup a tableview with all the exercises and when the user selects one it displays a checkmark. But i also want it to be saved to the relationships. So that when i query the data later on for a workout for example i want it to show me all the associated exercises on that workout. Any help would be greatly appreciated, thanks.