w3tecch / typeorm-seeding

🌱 A delightful way to seed test data into your database.
https://www.npmjs.com/package/typeorm-seeding
MIT License
887 stars 132 forks source link

Example for how to seed ManyToMany relation #223

Closed darrenbarklie closed 12 months ago

darrenbarklie commented 2 years ago

Hi there,

As per the issue detailed here, I'm looking for guidance on how to approach seeding ManyToMany relationships.

In my case, multiple Users can own multiple Companies.

I am aiming to see specific scenarios between User/Company ownership for testing, but couldn't find an appropriate example to seed as intended. Many thanks in advance.

darrenbarklie commented 2 years ago

Probably a duplicate of 139