Prisma 1 Forum

How to filter field relation that is empty field using FieldWhereInput

I have a table which has a relationship to the same table.

type Table {
  id: ID! @id
  parent: Table @relation(name: "ChildToParent")
  childrens: [Table] @relation(name: "ParentToChildren")

I want to query the table where for items which are the parents and query the table for which items are the child to a parent