We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ZModel:
model Tenant { id String @id @default(uuid()) users User[] posts Post[] comments Comment[] postUserLikes PostUserLikes[] } model User { id String @id @default(uuid()) tenantId String @default(auth().tenantId) tenant Tenant @relation(fields: [tenantId], references: [id]) posts Post[] likes PostUserLikes[] @@allow('all', true) } model Post { tenantId String @default(auth().tenantId) tenant Tenant @relation(fields: [tenantId], references: [id]) id String @default(uuid()) author User @relation(fields: [authorId], references: [id]) authorId String @default(auth().id) comments Comment[] likes PostUserLikes[] @@id([tenantId, id]) @@allow('all', true) } model PostUserLikes { tenantId String @default(auth().tenantId) tenant Tenant @relation(fields: [tenantId], references: [id]) id String @default(uuid()) userId String user User @relation(fields: [userId], references: [id]) postId String post Post @relation(fields: [tenantId, postId], references: [tenantId, id]) @@id([tenantId, id]) @@unique([tenantId, userId, postId]) @@allow('all', true) } model Comment { tenantId String @default(auth().tenantId) tenant Tenant @relation(fields: [tenantId], references: [id]) id String @default(uuid()) postId String post Post @relation(fields: [tenantId, postId], references: [tenantId, id]) @@id([tenantId, id]) @@allow('all', true) }
TS:
const tenant = await prisma.tenant.create({ data: {}, }); const user = await prisma.user.create({ data: { tenantId: tenant.id }, }); const db = enhance(prisma, { user: { id: user.id, tenantId: tenant.id } }); await db.post.create({ data: { likes: { createMany: { data: [{ userId: user.id }] } } }, include: { likes: true } });
Error: // Prisma error: Unknown argument `tenantId`. Available options are marked with ?.]
// Prisma error: Unknown argument `tenantId`. Available options are marked with ?.]
The text was updated successfully, but these errors were encountered:
fix(auth): refix issue #1997
91bedcd
fixes #2019
fix(auth): refix issue #1997 (#2021)
1c5900e
No branches or pull requests
ZModel:
TS:
Error:
// Prisma error: Unknown argument `tenantId`. Available options are marked with ?.]
The text was updated successfully, but these errors were encountered: