Relative Content

Tag Archive for databaseormmany-to-manytypeormmany-to-one

How to Create TypeORM Entities for Users and Organizations with Roles?

A user can create as many organizations as they like. An organization can contain multiple users. A user can have only one role in an organization, but they can have another role in a different organization. An organization can have multiple users for one role. The user is the main table, so the JoinTable decorator should be in the user entity.