Skip to content

[Bug]: Prisma UpdatedAt not working #1452

@Yurichz

Description

@Yurichz

Contact Details

No response

What happened?

I creating models with with field:
'updatedAt DateTime @default(now()) @updatedat'
And than updating any fields from admin js, field 'updatedAt' didn't changing.
image
image

If i try updating from basic route, field 'updatedAt' works normally.
image

Bug prevalence

Any time

AdminJS dependencies version

"@adminjs/design-system": "3.1.8",
"@adminjs/express": "5.1.0",
"@adminjs/nestjs": "5.1.0",
"@adminjs/prisma": "3.0.1",

What browsers do you see the problem on?

No response

Relevant log output

No response

Relevant code that's giving you issues

model Template {
  id          Int             @id @default(autoincrement())
  type        String          @unique
  html        String
  createdAt   DateTime        @default(now())
  updatedAt   DateTime        @default(now()) @updatedAt
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions