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
Introspection composite foreign keys pointing to composite primary keys #1599
Introspection composite foreign keys pointing to composite primary keys #1599
Comments
Can you run this test again @matthewmueller? The Introspection result should probably be different now. |
Is this now the expected result from introspection? generator client {
provider = "prisma-client-js"
output = "${tmp}"
}
datasource pg {
provider = "postgresql"
url = "${connectionString}"
}
model a {
one Int
two Int
@@id([one, two])
}
/// The underlying table does not contain a unique identifier and can therefore currently not be handled.
// model b {
// a a @map(["one", "two"])
// } It gives an unexpected token when parsing, but hopefully that's fixed by the recent merge. |
You'll probably get more insight by adding an explicit ID or Unique to the |
Yep, as long as you do not add an ID on b that is the expected result. |
Can you please update the integration test to include an explicit ID here @matthewmueller? |
The
@relation(references: [a])
seems wrong, at least I can't understand this.The text was updated successfully, but these errors were encountered: