-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Bug description
In Visual Studio Code, the "Go to Definition" feature does not work when referencing a model defined in a different schema file using Prisma's @@schema
annotation in a multi-schema setup.
How to reproduce
- Create a Prisma project with multiple schema files using the
@@schema
annotation. - In Schema A, define a model named
Test
. - In Schema B, define another model named
Test_2
and reference theTest
model (e.g., as a relation field). - Attempt to use "Go to Definition" on the reference to
Test
withinTest_2
.
Expected behavior
It should navigate me to the Test Model Definition.
Prisma information
generator client {
provider = "prisma-client-js"
output = "../src/generated/prisma"
previewFeatures = ["multiSchema"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
schemas = ["schemaA", "schemaB"]
}
model Test {
id Int @id
@@schema("schemaA")
}
model Test_2 {
id Int @id
test Test @relation(fields: [testId], references: [id])
testId Int
@@schema("schemaB")
}
Environment & setup
- OS: Windows
- Editor: VS Code
- Editor version: 1.101.2
- Extension version: v.6.10.1
Metadata
Metadata
Assignees
Labels
No labels