Skip to content

stashBefore - Not working when performing a patch of several records. #383

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

Open
rondaniel00 opened this issue Apr 26, 2018 · 2 comments · May be fixed by #764
Open

stashBefore - Not working when performing a patch of several records. #383

rondaniel00 opened this issue Apr 26, 2018 · 2 comments · May be fixed by #764

Comments

@rondaniel00
Copy link

rondaniel00 commented Apr 26, 2018

Steps to reproduce

Use this hook in a before patch.
Try to patch several records with arbitrary data and specify some params to query those records.
Verify context.params do not contain the records before the patch is done.

@Artaud
Copy link

Artaud commented Jul 21, 2023

I can confirm that this still doesn't work well for a multipatch / multiupdate. I can provide a PR but I'm not sure how to approach it with regards to backwards compatibility.

@fratzinger
Copy link
Collaborator

Just a quick headsup. I started working on a massive rewrite of the package (#764). It's not released yet and will take a few weeks.

This should be working then, see https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/modernize/src/hooks/stash-before/stash-before.ts

@fratzinger fratzinger linked a pull request Feb 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants