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

getOne does not allow extra where parameters from query #66

Open
ebuzzz opened this issue Mar 20, 2024 · 1 comment
Open

getOne does not allow extra where parameters from query #66

ebuzzz opened this issue Mar 20, 2024 · 1 comment

Comments

@ebuzzz
Copy link

ebuzzz commented Mar 20, 2024

I want to add ACL checks for fetching single items via getOne. Unfortunately, the current PrismaAdapter does not seem to handle the additional where query. It always sets the where to only include the primary key. The same is true for the update and delete handlers.

This feels like a bug, or is there a specific reason for this behavior?

@foyarash
Copy link
Contributor

Hello

According to documentation, the findUnique method accepts only ID / unique fields.

For the update and delete methods, this looks to be possible since v4.5, so it should be fixable

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

No branches or pull requests

2 participants