Association functions names can be provided in models
Issue Creation Checklist
- [x] I understand that my issue will be automatically closed if I don't fill in the requested information
- [x] I have read the contribution guidelines
Feature Description
Associations such as hasMany or belongsToMany right now consider the model name (or alias) to create functions which can get associated data this makes the process a little confusing as you have to sometimes assume the name of the function and test it with alias name or model name. It would be great if while defining the model, names of association functions could be passed
Describe the feature you'd like to see implemented
{
get: getPicture,
set: setPictureOfPerson,
...
}
Describe why you would like this feature to be added to Sequelize
It eliminates confusion and make associations faster
Is this feature dialect-specific?
- [x] No. This feature is relevant to Sequelize as a whole.
- [ ] Yes. This feature only applies to the following dialect(s):
Would you be willing to resolve this issue by submitting a Pull Request?
- [x] Yes, I have the time and I know how to start.
- [x] Yes, I have the time but I will need guidance.
- [ ] No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
- [ ] No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in implementing my feature.
Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.
I don't know if we're going to add such a feature since we're considering changing the system altogether https://github.com/sequelize/sequelize/issues/14302
Oh okay! that's even better
I'll close in favor of that one then :)