I am building a custom feature to create lists of favourite products.
For this purpose I have created 2 models: The actual list-entity and a model representing information about a single product. For each of these models I crated a database-table as well as a model, resource-model, collection and repository class (I will thin this out once I know what I don't need).
The list-entity table holds information about the customer the list belongs to and list-specific data such as a name. The list-item table holds information about what list it belongs to and which product it represents.
At which point/layer should I connect these when trying to fetch information (eg. I am trying to get all lists for a single user, along with the included products)? Should this be accessible in the model, the collection or the repository? What would be the cleanest way?