Prisma schema help
Unanswered
Egyptian Mau posted this in #help-forum
Egyptian MauOP
Im working on a NextJS project with Prisma and mangoDB
I have an Activity model that has a relationship with Member
when first creating an Activity it doesn't have members only and owner but i still want to set the default value to an empty array.
when I try to do so with a post request and set members: [] to an empty array i get this error:
Argument members: Invalid value provided. Expected MemberCreateNestedManyWithoutActivityInput.
will appreciate any help to solve this problem.
I have an Activity model that has a relationship with Member
when first creating an Activity it doesn't have members only and owner but i still want to set the default value to an empty array.
when I try to do so with a post request and set members: [] to an empty array i get this error:
Argument members: Invalid value provided. Expected MemberCreateNestedManyWithoutActivityInput.
will appreciate any help to solve this problem.
1 Reply
@Egyptian Mau Im working on a NextJS project with Prisma and mangoDB
I have an Activity model that has a relationship with Member
when first creating an Activity it doesn't have members only and owner but i still want to set the default value to an empty array.
when I try to do so with a post request and set members: [] to an empty array i get this error:
Argument members: Invalid value provided. Expected MemberCreateNestedManyWithoutActivityInput.
will appreciate any help to solve this problem.
Double-striped Thick-knee
do you want activity.members to be an empty array?