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

Auto completion suggests @map although already present #1079

Closed
janpio opened this issue Mar 11, 2022 · 1 comment · Fixed by #1320
Closed

Auto completion suggests @map although already present #1079

janpio opened this issue Mar 11, 2022 · 1 comment · Fixed by #1320
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: autocompletion
Milestone

Comments

@janpio
Copy link
Member

janpio commented Mar 11, 2022

image

For reproduction:

generator client {
    provider        = "prisma-client-js"
    previewFeatures = "mongoDb"
}

datasource pg {
    provider = "mongodb"
    url      = env("TEST_DB_URL")
}

model with_id_and_compound_unique {
  id   Int    @id @map("_id") @
}
@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: autocompletion team/schema Issue for team Schema. labels Mar 11, 2022
@Jolg42
Copy link
Member

Jolg42 commented Mar 15, 2022

Probably not mongodb specific, there is sometimes some logic to deduplicate but not always

@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Mar 15, 2022
Druue added a commit that referenced this issue Dec 8, 2022
Added test to ensure that `@map` is not suggested when already present in line
Updated another test to ensure that it does still show when already present on another line
Minor refactoring
@Druue Druue self-assigned this Dec 8, 2022
@Jolg42 Jolg42 added this to the 4.8.0 milestone Dec 12, 2022
Druue added a commit that referenced this issue Dec 12, 2022
* Fixes: #1079
Added filter to remove `@map` when already present in line
Added test to ensure that `@map` is not suggested when already present in line

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: autocompletion
Development

Successfully merging a pull request may close this issue.

3 participants