Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isId in option.properties does not work #24

Open
Anto22001 opened this issue Nov 3, 2022 · 1 comment
Open

isId in option.properties does not work #24

Anto22001 opened this issue Nov 3, 2022 · 1 comment

Comments

@Anto22001
Copy link

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

adminjs@6.5.0
adminjs/prisma@3.0.1

Prisma Version

prisma@4.5.0
prisma/client@4.5.0

@Zovube
Copy link

Zovube commented Dec 25, 2023

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

@dziraf could you take a look?

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

No branches or pull requests

2 participants