-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Labels
Milestone
Description
My zmodels are:
abstract model BaseAuth {
id String @id @default(uuid())
dateCreated DateTime @default(now())
dateUpdated DateTime @updatedAt @default(now())
organizationId String?
organization Organization? @relation(fields: [organizationId], references: [id], name: "organization")
@@allow('all', organization.users?[user == auth()])
}
enum ResourceType {
Personnel
}
model Resource extends BaseAuth {
name String?
type ResourceType?
costRate Int?
budgets ResourceBudget[]
@@delegate(type)
}
model Personnel extends Resource {
}
I get this error when trying to query a resource:
Invalid `prisma.resource.findMany()` invocation:
{
where: {
OR: [
{
OR: [
{
organization: {
users: {
some: {
user: {
is: {
id: "553a6c87-3a77-475b-8f56-f5fb59f92630"
}
}
}
}
}
}
]
}
]
},
include: {
delegate_aux_personnel: {
where: {
OR: [
{
OR: [
{
organization: {
users: {
some: {
user: {
is: {
id: "553a6c87-3a77-475b-8f56-f5fb59f92630"
}
}
}
}
}
}
]
}
]
},
include: {
delegate_aux_resource: {}
}
}
}
}
Unknown argument `organization`. Available options are marked with ?.
Originally posted by @j0rdanba1n in #1734 (comment)