Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ludalex
Copy link
Contributor

@ludalex ludalex commented Oct 31, 2024

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.

@jkar32
Copy link

jkar32 commented Dec 2, 2024

Something akin to this would be legendary.

@morintd morintd merged commit 3ae786f into morintd:master Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants