In this lesson, we'll describe what a one to many relationship is, and how we can use
Room to model this relationship type.
We'll model our data so that one
User can have multiple
Tasks assigned to them. And we'll learn how to write a query which brings back an entity as well as all of its related entities.
Summary of Content:
- What a one to many relationship is
- Alternative ways of modelling users and tasks
- Using an
SQL JOINquery to obtain a task and its assigned user
- Creating a wrapper class which contains both a Task and a User
- How to handle the scenario when multiple fields have a the same column name -
Multiple fields have the same columnName
- Adding a custom prefix using