Property 'xxx' is missing in type with relation
Hello, I am new to the prisma ecosystem and I am having a hard time understanding how it works.
Here is my current .prisma file structure:
Here is my expected output (on select group)
The issue is that when I try to add to the database a new group, I get the following:
Can somebody tell me what I am missing exactly ? Thank you
4 Replies
On your
groupId
you are missing the @default
param, unless you wanted to manually specify an ID in your code, which is what your model would imply
Typically if you want an id that automatically populates you want to do something similar to what you've done in the Group model
But in GroupGraphics and GroupQA there is no @default
paramHi @IgniteHost
Like Cold already said, you are missing the
groupId
in the create section for both faq
and graphics
You may want to review your schema to allow for groupId
in GroupGraphics
and GroupQA
to be created by default so you wouldn't need to create them at every point.What I want is to create the graphics with an auto generated id that will link my GroupGraphics to the graphics of my inserted group, not a hard coded id
@IgniteHost you would need to modify your schema for
GroupGraphics
. something along the lines of