Skip to content

feat: Add information on extra attributes on join table in N:M relati…#494

Open
garretaserra wants to merge 11 commits intosequelize:mainfrom
garretaserra:main
Open

feat: Add information on extra attributes on join table in N:M relati…#494
garretaserra wants to merge 11 commits intosequelize:mainfrom
garretaserra:main

Conversation

@garretaserra
Copy link
Copy Markdown

Added documentation for new functionality in sequelize/sequelize#16101

@ephys
Copy link
Copy Markdown
Member

ephys commented Jun 17, 2023

sequelize/sequelize#16101 targets the v7 branch but this documentation is written for v6

@garretaserra
Copy link
Copy Markdown
Author

Moved documentation to v7

@ephys
Copy link
Copy Markdown
Member

ephys commented Jun 26, 2023

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

@garretaserra
Copy link
Copy Markdown
Author

I'm not sure where to put it exactly as it affects both the set and the add mixins.

@ephys
Copy link
Copy Markdown
Member

ephys commented Jul 1, 2023

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)

@garretaserra
Copy link
Copy Markdown
Author

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.
What do you think?

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:

toot
noun

1 a short, sharp sound made by a horn, trumpet, or similar instrument.
2 INFORMAL a snort of a drug, especially cocaine.
3 INFORMAL•NORTH AMERICAN a spell of drinking and lively enjoyment; a spree.

verb

1 sound (a horn or similar) with a short, sharp sound.
2 INFORMAL snort (cocaine).

@garretaserra
Copy link
Copy Markdown
Author

Let me know if there is something more to do in this PR

@ephys ephys requested a review from a team as a code owner April 5, 2026 15:21
@ephys ephys requested review from Copilot and sdepold April 5, 2026 15:21

This comment was marked as resolved.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ephys
Copy link
Copy Markdown
Member

ephys commented Apr 5, 2026

This looks good, now we just have to merge the other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants