I am working on an app that I need to manage persistency for 2 data models.
The app is as simple as it will let me add courses I am taking first, then for each course, I will add some tasks to do.
Courses will display in a TableView, tapping on a course will show tasks in another screen which is also a table view.
I have made CoreData work for CourseModel, I think I will need TaskModel to keep Task table persistent but I am stuck at how to make them work together.
This is CourseModel: works with Course Table
list: CourseList (To One, inverse: members)
members: Course (To Many)
list: TaskList (To One, inverse: members)
members: Task (To Many)
I think it should be as simple enough as this:
Course courseCode: String courseTitle: String courseDesc: String tasks: Task (To Many, inverse: course) Task course: Course (To One, inverse: tasks)
A Course has many tasks and a Task belongs to a Course.