-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
request.original in afterSave handler gone #5167
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
Comments
Can you point out a commit that would have removed this feature? |
It disappeared when I switched from 2.8.4 to 3.0.0 |
I just tried to reproduce it with this #5170 and it behaves as expected. The original object is only present on updates (as written in RestWrite.js). |
ah! my bad. I didn't know that the original is only there in that case. |
It should be there whenever there was an original object in the DB ‘before’ the save call enters I.e. when the object is updated, not when it is created. |
Thank you for the clarification. |
You’re welcome, in doubt, the code is is RestWrite.js, and should be quite straight forward when it comes to hooks. Another part is in triggers.js |
Issue Description
I have an afterSave handler that uses request.original data to check if a field truly has changed.
Steps to reproduce
try to access request.original
Expected Results
access to request.original
Actual Outcome
request.original is undefined
Environment Setup
Server
Database
Logs/Trace
The text was updated successfully, but these errors were encountered: