Skip to content

Using uuidv7() as id makes update methods fail #384

@digoburigo

Description

@digoburigo

When using the dbgenerated function with uuidv7() from Postgres v18 the update method don't work

const { mutate: updateTodo } = client.todo.useUpdate();
model Todo {
   id        String   @id @default(dbgenerated("uuidv7()")) // this is from Postgres v18
  ...
}

When using with autoincriment with type Int the update works normally

const { mutate: updateTest } = client.test.useUpdate();
model Test {
  id        Int      @id @default(autoincrement())
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions