Skip to content
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

Explain joinTableAttributes versus include: { attributes } in the manuals #97

Open
2 of 7 tasks
papb opened this issue Jan 19, 2020 · 3 comments
Open
2 of 7 tasks

Comments

@papb
Copy link
Member

papb commented Jan 19, 2020

Issue Description

Currently the joinTableAttributes option is barely mentioned in the manuals (ctrl+f here).

What was unclear/insufficient/not covered in the documentation

What does it do and how it relates to the more known include: { attributes: [ /* ... */ ] } option

If possible: Provide some suggestion on how we can enhance the docs

Just briefly mention it in the manuals and explain its difference, no need for complicated things...

Issue Template Checklist

Is this issue dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
  • I don't know.

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.
@msallent
Copy link

THANK YOU!

I spent hours trying to find how to omit the through table's attributes entirely while using a mixin and this was exactly what I was looking for.

Adding to this, using joinTableAttributes is not possible while using TypeScript as the type BelongsToManyGetAssociationsMixin doesn't include it so it might be a good idea to update all the mixin types as well.

@papb
Copy link
Member Author

papb commented Jan 23, 2020

@msallent

THANK YOU!

I spent hours trying to find how to omit the through table's attributes entirely while using a mixin and this was exactly what I was looking for.

😬

Adding to this, using joinTableAttributes is not possible while using TypeScript as the type BelongsToManyGetAssociationsMixin doesn't include it so it might be a good idea to update all the mixin types as well.

Actually this was already fixed earlier this week at sequelize/sequelize#11818, however there was no release yet.

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

cincodenada referenced this issue in cincodenada/sequelize Jan 4, 2022
This address #11847 partially at least - I'm not sure where else it should be documented.
fzn0x referenced this issue in sequelize/sequelize Jan 6, 2022
* Document `joinTableAttributes` in `belongsToMany` mixin

This address #11847 partially at least - I'm not sure where else it should be documented.

* Tweak wording a bit

* Try to make this a little clearer

Co-authored-by: fncolon <fncolon@pm.me>
sdepold referenced this issue in sequelize/sequelize Jan 10, 2022
* Document `joinTableAttributes` in `belongsToMany` mixin

This address #11847 partially at least - I'm not sure where else it should be documented.

* Tweak wording a bit

* Try to make this a little clearer

Co-authored-by: fncolon <fncolon@pm.me>
@ephys ephys transferred this issue from sequelize/sequelize Apr 16, 2022
@ephys ephys removed the type: docs label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants