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

feat: Add queryAndParameters to EntitySubscriberInterface afterUpdate and afterSoftRemove #11117

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

felipecsl
Copy link

Description of change

Right now EntitySubscriberInterface are largely useless when queries are executed via QueryBuilder since no useful information is passed to the event handlers.
I thought it would be useful to at the very least provide the original query and the parameters bound to it, so people could at least parse the query and do something with it.

We found this as a way to unblock ourselves. Could add it to other hooks as well if people are happy with the approach.

Pull-Request Checklist

Partially fixes #2246

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

"private": true,
"version": "0.3.20",
"name": "@felipecsl/typeorm",
"version": "0.3.23",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can revert this before merging

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.

EventSubscriber not getting updated values for update using queryBuilder and manager.update methods.
1 participant