-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add information on extra attributes on join table in N:M relati… #494
base: main
Are you sure you want to change the base?
Conversation
sequelize/sequelize#16101 targets the v7 branch but this documentation is written for v6 |
Moved documentation to v7 |
Thanks :) Unfortunately your branch was outdated and the changes were made against the old version of the v7 docs, which were recently completely rewritten. Could you look into fixing the merge conflict? I assume this could be documented as part of this section https://sequelize.org/docs/v7/associations/belongs-to-many/#association-setter-setx |
I'm not sure where to put it exactly as it affects both the set and the add mixins. |
That's a good point. I think it could go as a sub-section of this instead then: https://sequelize.org/docs/v7/associations/belongs-to-many/#customizing-the-junction-table With mentions of set & add that links to the sections about set and add About the content: While what you wrote still works in Sequelize 7, the new documentation uses the typescript + decorator approach first (with optional Tabs if we want to provide a typescript-free example) |
It took a while because I had to learn how to correctly use the typescript definitions. Also while working on the sscce for the documentation example I found I bug on the code for this update which I will be looking into. Finally I think that its probably for the best to merge the documentation from Customizing the Junction Table nad what I did in the subsection Associations with extra attributes on through table by basing from the same example of person and toot. On another note: The example of Person and Toot might not be the best. As a non native speaker I had barely heard the expression Toot, and a quick google search gives the following meaning:
|
Let me know if there is something more to do in this PR |
Added documentation for new functionality in sequelize/sequelize#16101