Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

executeRaw and executeRawUnsafe did not invalidate model caches #661

Closed
Hazmi35 opened this issue Dec 3, 2023 · 1 comment
Closed

executeRaw and executeRawUnsafe did not invalidate model caches #661

Hazmi35 opened this issue Dec 3, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Hazmi35
Copy link
Contributor

Hazmi35 commented Dec 3, 2023

Describe the bug
executeRaw and executeRawUnsafe did not invalidate model caches.

To Reproduce
Steps to reproduce the behavior:

  1. Do findMany action of a model
  2. Do an update to their columns using executeRaw or executeRawUnsafe
  3. Do findMany action of a model again, cache hit
  4. The result of the second findMany is using the cache despite mutation from executeRaw or executeRawUnsafe

Expected behavior
It should invalidate the caches.

Screenshots
Screenshot 2023-12-03 110857

Additional context
As you can see from the screenshot, I'm currently using executeRawUnsafe, but the params.action is executeRaw, and executeRaw is not in defaultMutationMethods. I'm currently using Prisma 5.6.0. I'm not sure if this would also apply to Prisma 4 or lower.

I've made a PR for this #660

@Hazmi35
Copy link
Contributor Author

Hazmi35 commented Dec 3, 2023

Accidentally closed from private repo PR linked issue feature. Issue still exists, reopening.

@Asjas Asjas added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 3, 2023
@Asjas Asjas closed this as completed Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants