Many-to-Many through associations behave the same way as many-to-many associations with the exception of the join table being automatically created for you. This allows you to attach additional attributes onto the relationship inside of the join table.
Unfortunately, they are not supported yet. Don't worry though, there's an easy workaround.
You can accomplish this by using an additional model as an intermediary. Instead of a many-to-many association between two models, you can use multiple one-to-many associations through the intermediary model.
Is something missing?
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.
- Custom Responses
- Extending Sails
- File Uploads
- Models and ORM
We wrote a book!
Get early access to the book
with promotion code: mcneildoc