adminjs-prisma icon indicating copy to clipboard operation
adminjs-prisma copied to clipboard

Update error when use id alias in Mongodb.

Open x-ray-s opened this issue 3 years ago • 2 comments

model Test {
  oid String   @id @default(auto()) @map("_id") @db.ObjectId
  name String
}

When I update name property, I got an error which is "Unknown arg oid in data.oid for type IdAliasUpdateInput. Available args:"

You can run this repo to find the error.

I try to fix this error. delete the key which is the id in the data.

in Resource.ts

++ delete preparedParams[idProperty.path()]

x-ray-s avatar Aug 09 '22 07:08 x-ray-s

Any updates on this issue?

hamzalakrati avatar Nov 06 '22 01:11 hamzalakrati

same issue

maglimedia avatar Jan 04 '23 18:01 maglimedia