I feel like something broke recently as I had code...
# orm-help
i
I feel like something broke recently as I had code that made sense based on the docs and worked and weeks later (after prisma updates) I come back and it no longer works... Error: { data: { ticketId: 226, ~~~~~~~~ + ticket: { + create?: TicketCreateWithoutTemplateTicketIdInput | TicketUncheckedCreateWithoutTemplateTicketIdInput, + connectOrCreate?: TicketCreateOrConnectWithoutTemplateTicketIdInput, + connect?: TicketWhereUniqueInput + }, } } } Unknown arg
ticketId
in data.ticketId for type TemplateItemCreateInput. Did you mean
ticket
? Argument ticket for data.ticket is missing.
Copy code
const creation = await prisma.templateItem.create({
                        data: {
                            ticketId: ticket.id
                        }
                    });
And here is the simplified schema: model TemplateItem { id Int @id @default(autoincrement()) ticket Ticket @relation(fields: [ticketId], references: [id]) ticketId Int } model Ticket { id Int @id @default(autoincrement()) templateTicketId TemplateItem? } I've removed extra stuff that isn't important to simplify the code So if I've got a 1-1 relationship setup, why won't it let me pass in the ticketId? It sounds like it doesn't even understand that it's in the schema, yet it's clearly there and worked before. Am I missing something or did something change? I want to make a TemplateItem and reference the id of the existing Ticket.