Improve error on default values when @db.ObjectId
isn't present
#6429
Labels
kind/improvement
An improvement to existing feature and code.
team/schema
Issue for team Schema.
topic: mongodb
topic: schema validation
Milestone
(MongoDB is not publicly available yet. This issue is for the development build.)
Problem
Given the following Prisma Schema
This is a valid schema according to
prisma validate
:Unfortunately, when you run the following:
You get the following error:
Suggested Solution
We validate that you need
@db.ObjectId
and don't allow a generated client in this state or provide a better error informing users to supply@db.ObjectId
.The text was updated successfully, but these errors were encountered: