This adds support for having dbgenerated() ids in your schema while still being able to use prismock to create entries without explicitly passing the id.
Previously, in a schema file with ids defined like this:
model Thing {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
...
Calling prismock.thing.create({}) would result in an object with an undefined id.
This adds support for having
dbgenerated()
ids in your schema while still being able to use prismock to create entries without explicitly passing the id.Previously, in a schema file with ids defined like this:
Calling
prismock.thing.create({})
would result in an object with an undefinedid
.