Skip to main content
Context: As a user I want to display records that have a belongsTo relationship to another record as related data of this record. Parent collection: user Child collection: visualization

Models definition

models/user.js
models/visualization.js

Declaration of the relationship

As the relationship that is not present in your database structure, declare it at the level of the forest folder. forest/user.js

Implementation of the get route for the relationship

The route to get the related visualizations when you are on a user page needs to be implemented in the routes folder. routes/user.js