model User {
id Int @id @default(autoincrement())
email String @unique @email @length(6, 32) @allow('read', auth() == this)
// full access to all
@@allow('all', true)
}
// count returns 1 correctly
db.user.count({ where: { email: { contains: 'web.com' } } };
// It returns all users, but only shows the email for current user.
db.user.findMany({ where: { email: { contains: 'web.com' } } })
- expected
findMany should also return one record same as count.