Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSuggestion: Remove all aliases in v5 #9372
Comments
sushantdhiman
added
semver:major
suggestion
labels
Apr 30, 2018
This comment has been minimized.
This comment has been minimized.
I have edited your post for better readability. Good idea overall, we need to deprecate duplicate cases first, then remove them from master. This change should be easy to implement in small PRs |
sushantdhiman
added this to the v5 milestone
Apr 30, 2018
sushantdhiman
added
the
good first issue
label
Apr 30, 2018
This comment has been minimized.
This comment has been minimized.
@sunshinewyin the ones Iisted where just examples, there are quite a few more. |
This comment has been minimized.
This comment has been minimized.
@sushantdhiman I'll see if I can do that. |
This comment has been minimized.
This comment has been minimized.
As requested by @sushantdhiman Final
QuestionShould we add deprecation message or just add the migration table in the changelog ? |
This comment has been minimized.
This comment has been minimized.
Thanks @frlinw , A few changes
I can take care of deprecating them from v4 once these changes land to master |
This comment has been minimized.
This comment has been minimized.
Yea sorry, been super busy, cudos to @frlinw for taking over. |
This comment has been minimized.
This comment has been minimized.
I started to work on it. I'm doing some reorg for imports (require) in test files because it's a mess, will make a PR after that. |
This comment has been minimized.
This comment has been minimized.
beforeConnection added to the list, it's not used internally and it's the last hook alias |
This comment has been minimized.
This comment has been minimized.
Implemented in #9933 |
sushantdhiman
closed this
Sep 19, 2018
This comment has been minimized.
This comment has been minimized.
Hey, what about all the
and more? |
This comment has been minimized.
This comment has been minimized.
They are ok for now |
This comment has been minimized.
This comment has been minimized.
One more, what about the |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Another alias I came across is Also at the same time that section should be optimized, accessing enums shouldn't invoke object creation, we should just Object.freeze and assign it directly :) |
SimonSchick commentedApr 29, 2018
•
edited
Not sure if I'm too late here but over the years Sequelize has create many many aliases functions. I think it would be a good idea to remove the aliases with the next major release.
find
vs.findOne
findById
vs.findByPrimary
afterBulkDestroy
vsafterBulkDelete
addHook
v.hook
VIRTUAL
vsNONE
Edit: Formatting