Prisma 1 Forum

How i get all elements with no relation

My prisma schema

type File {
  directory: Directory
  createdAt: DateTime! @createdAt
  updatedAt: DateTime! @updatedAt
  active: Boolean @default(value: true)
  comments: [Comment!]!

i want get only all Files with not relation in Directoy column.

if i try that, i have all lines

await prisma
        .project({ id: project_id })

if i try that, i have no lines ( undefined and null )

await prisma
        .project({ id: project_id })
        .directories({ where: { parent: { id: undefined } } }

i need help :frowning:

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.