Skip to content
Discussion options

You must be logged in to vote

Hi @masonstevens95 👋

Prisma Client does not recognize userId_plantSpeciesId as a field in the UserPlantSpeciesInventoried model. In Prisma, when you're defining a relation and specifying the fields and references arguments, the references argument should refer to a unique field or a unique combination of fields in the related model.

In your case, the UserPlantSpeciesInventoried model has a compound ID, which is a combination of userId and plantSpeciesId. When you're defining the relation in the InventoryReadyByDate model, you should reference these fields separately, not as a combined field userId_plantSpeciesId.

model InventoryReadyByDate {
  id String @id @default(cuid())
  
  userId St…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by masonstevens95
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
discussion/needs-confirmation Needs a user to confirm the solution before the Discussion can be marked as answered
2 participants