What does "Unchecked" mean? #10121
-
Hi there 👋 Most CRUD operations take in a Curious about this because I'm currently getting an error along the lines of prisma.user.create({
data: {
teams: {
connectOrCreate: teams.map((team) => {
return {
where: { name: team.name },
create: {
name: team.name,
color: team.color,
},
};
}),
},
},
}); Thanks in advance 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @topbloc-beiswenger! This is a great question. "Unchecked" input types allow you to perform some operations that are often considered "dangerous", like directly writing foreign keys. Prisma allows you to choose either a safe or an unchecked input type when doing operations like I'm unsure why you are hitting your specific error, but if you could share your schema file with me, I can do some digging on my side. |
Beta Was this translation helpful? Give feedback.
Hi @topbloc-beiswenger! This is a great question.
"Unchecked" input types allow you to perform some operations that are often considered "dangerous", like directly writing foreign keys. Prisma allows you to choose either a safe or an unchecked input type when doing operations like
create
.I'm unsure why you are hitting your specific error, but if you could share your schema file with me, I can do some digging on my side.