Closed
Description
Today policy rules allow you to do comparisons but only one field can be involved in an expression, which means with:
model Foo {
x Int
y Int
}
@@allow(x > 0)
is valid, but @@allow(x > y)
is rejected at compile time.
Prisma has a preview feature called fieldReference which allows you to compare between fields in the same table. We can use that to relax some of the restrictions here.