Hey guys, I think the onDelete param of my relatio...
# orm-help
i
Hey guys, I think the onDelete param of my relation isn't working. Just check :
Copy code
MODEL :
type A {
    b: B! @relation(name: "MyRelation", onDelete: SET_NULL)
}

type B {
    as: [A!]! @relation(name: "MyRelation", onDelete: SET_NULL)
}
Copy code
MUTATION :
deleteB(id: ID!): B!

return ctx.db.mutation.deleteB({ where: { id } });
It always return me : The change you are trying to make would violate the required relation 'MyRelation' between A and B Have you an idea ? Thanks 🙂