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

Clicking on a MongoDB composite type does not jump to definition #1069

Closed
janpio opened this issue Mar 1, 2022 · 1 comment
Closed

Clicking on a MongoDB composite type does not jump to definition #1069

janpio opened this issue Mar 1, 2022 · 1 comment
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: jump-to-definition topic: mongodb
Milestone

Comments

@janpio
Copy link
Member

janpio commented Mar 1, 2022

Schema to test it out:

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

datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

type ListingsAndReviewsAddress {
  country         String
  country_code    String
  government_area String
  location        ListingsAndReviewsAddressLocation
  market          String
  street          String
  suburb          String
}

type ListingsAndReviewsAddressLocation {
  coordinates       Float[]
  is_location_exact Boolean
  type              String
}

type ListingsAndReviewsAvailability {
  availability_30  Int
  availability_365 Int
  availability_60  Int
  availability_90  Int
}

type ListingsAndReviewsHost {
  host_about                String
  host_has_profile_pic      Boolean
  host_id                   String
  host_identity_verified    Boolean
  host_is_superhost         Boolean
  host_listings_count       Int
  host_location             String
  host_name                 String
  host_neighbourhood        String
  host_picture_url          String
  host_response_rate        Int?
  host_response_time        String?
  host_thumbnail_url        String
  host_total_listings_count Int
  host_url                  String
  host_verifications        String[]
}

type ListingsAndReviewsImages {
  medium_url     String
  picture_url    String
  thumbnail_url  String
  xl_picture_url String
}

type ListingsAndReviewsReviewScores {
  review_scores_accuracy      Int?
  review_scores_checkin       Int?
  review_scores_cleanliness   Int?
  review_scores_communication Int?
  review_scores_location      Int?
  review_scores_rating        Int?
  review_scores_value         Int?
}

type ListingsAndReviewsReviews {
  id            String   @map("_id")
  comments      String?
  date          DateTime @db.Date
  listing_id    String
  reviewer_id   String
  reviewer_name String
}

model listingsAndReviews {
  id                    String                         @id @map("_id")
  access                String
  accommodates          Int
  address               ListingsAndReviewsAddress?
  amenities             String[]
  availability          ListingsAndReviewsAvailability?
  bed_type              String
  bedrooms              Int?
  beds                  Int?
  calendar_last_scraped DateTime                       @db.Date
  cancellation_policy   String
  description           String
  first_review          DateTime?                      @db.Date
  host                  ListingsAndReviewsHost?
  house_rules           String
  images                ListingsAndReviewsImages?
  interaction           String
  last_review           DateTime?                      @db.Date
  last_scraped          DateTime                       @db.Date
  listing_url           String
  maximum_nights        String
  minimum_nights        String
  name                  String
  neighborhood_overview String
  notes                 String
  number_of_reviews     Int
  property_type         String
  review_scores         ListingsAndReviewsReviewScores?
  reviews               ListingsAndReviewsReviews[]
  reviews_per_month     Int?
  room_type             String
  space                 String
  summary               String
  transit               String

  @@index([property_type, room_type, beds], map: "property_type_1_room_type_1_beds_1")
  @@index([name], map: "name_1")
}

Clicking on any of the composite types in listingsAndReviews will not jump to that type definition above.

@janpio janpio added topic: jump-to-definition bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: mongodb labels Mar 1, 2022
@janpio janpio added this to the 3.11.0 milestone Mar 1, 2022
@Jolg42 Jolg42 self-assigned this Mar 3, 2022
@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 3, 2022
Jolg42 added a commit that referenced this issue Mar 11, 2022
* fix(autocompletions): mongodb, composite types

Closes
#1060
#1061
#1064
#1069

* add missing file

* test: add @default(|) tests
@janpio
Copy link
Member Author

janpio commented Mar 11, 2022

This now works in v31.0.712.

@janpio janpio closed this as completed Mar 11, 2022
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. topic: jump-to-definition topic: mongodb
Projects
None yet
Development

No branches or pull requests

2 participants