I added a new value "expectedValue" to my schema, after creating many records, however i made it null-able so i didnt think it would be a problem:
在创建了许多记录之后,我在我的模式中添加了一个新值“expectedValue”,但是我将其设置为可为空,所以我认为这不会有问题:
model Procedure {
id Int @id @default(autoincrement())
stepNumber Int
step String
expectedValue String?
testCaseRef TestCase @relation(fields: [TestCaseId], references: [id])
TestCaseId Int
}
and now when i try to add a record for the expectedValue element, it cant seem to find it.
现在,当我尝试为expectedValue元素添加记录时,似乎找不到它。
I can see that it exists in my database because im looking at it in a database tool (tablePLus)
我可以看到它存在于我的数据库中,因为我在一个数据库工具(TablePLus)中查看它
const testCaseCreated = await prisma.TestCase.create({
data: {
name: '',
description: '',
Procedure: {
create: [
{
stepNumber: 1,
step: 'add a prof',
expectedValue: 'with vals'
~~~~~~~~~~~~~
}
]
},
tags: {
create: [
{
tag: {
connectOrCreate: {
where: {
tagName: 'create'
},
create: {
tagName: 'create'
}
}
}
}
]
},
TestCase_TestSuite: {
create: [
{
testSuite: {
connect: {
id: 86
}
}
}
]
}
}
})
the error im getting is: Unknown arg expectedValue
in data.Procedure.create.0.expectedValue for type ProcedureCreateWithoutTestCaseRefInput. Did you mean select
? Available args:
IM收到的错误是:数据中存在未知的Arg Expect tedValue。Procedure.create.0.expectedValue for type ProcedureCreateWithoutTestCaseRefInput。你是说挑选吗?可用参数:
type ProcedureCreateWithoutTestCaseRefInput {
stepNumber: Int
step: String
}
Any help would be appreciated.
任何帮助将不胜感激。
更多回答
优秀答案推荐
I fixed it by manually writing something in the expected values column on my database viewer
and now prisma can find it,
maybe its a bug in prisma.
我在我的数据库查看器上的期望值列中手动写入了一些东西,现在Prisma可以找到它,也许这是Prisma中的一个错误。
更多回答
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
正如它目前所写的,你的答案并不清楚。请编辑以添加更多详细信息,以帮助其他人了解这是如何解决提出的问题的。你可以在帮助中心找到更多关于如何写出好答案的信息。
我是一名优秀的程序员,十分优秀!