Skip to content

Field level policies always select relations #1978

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

Closed
f8k8 opened this issue Feb 5, 2025 · 1 comment
Closed

Field level policies always select relations #1978

f8k8 opened this issue Feb 5, 2025 · 1 comment

Comments

@f8k8
Copy link

f8k8 commented Feb 5, 2025

Description and expected behavior
When a model has field level policies which reference other models through a relation, the relations are always selected, even if the relation field is not present in the original select.

Environment:

  • ZenStack version: 2.11.5
  • Prisma version: 6.3.1
  • Database type: Postgresql

Additional context
getFieldReadCheckSelector (here) should probably use visitTarget to determine which of the fields with field level policies need to be checked.

@ymc9
Copy link
Member

ymc9 commented Feb 16, 2025

Fixed in 2.11.6

@ymc9 ymc9 closed this as completed Feb 16, 2025
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