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

isId in option.properties does not work

Open Anto22001 opened this issue 3 years ago • 2 comments

Bug description

I tried to set which field in my database model should be considered as primary key using:

{
  resource: { model: dmmf.modelMap.User, client: prisma },
  options: {
    properties: {
      userId: { isId: true }
    }
  }
}

but it seems not working because resource properties are generated from prisma model without specified options

Environment & setup

OS: macOS Monterey Database: PostgreSQL Node.js version: 16.14.2

AdminJS Version

[email protected] adminjs/[email protected]

Prisma Version

[email protected] prisma/[email protected]

Anto22001 avatar Nov 03 '22 15:11 Anto22001

Thanks for looking into it, would be really great to fix

@dziraf could you take a look?

Zovube avatar Dec 25 '23 18:12 Zovube