Closed westernwontons closed 1 year ago
running into the same issue with postgresql
reproduction:
datasource db {
provider = "postgresql"
url = env("PRISMA_DATABASE_URL")
}
generator rust {
provider = "cargo prisma"
output = "./src/prisma.rs"
}
enum ProductType {
New
}
model Test {
id Int @id
product_type ProductType
}
error[E0412]: cannot find type `ProductType` in this scope
--> src/prisma.rs:653:23
|
653 | InVec(Vec<ProductType>),
| ^^^^^^^^^^^ not found in this scope
|
help: consider importing this enum
|
596 | use crate::prisma::ProductType;
|
I'm also running into this using postgresql. Currently just working around it by manually bringing in the enum into scope.
Duplicate of #197. Has been fixed on 1.6.4 branch.
Awesome, just switched to using 0.6.4 branch and it works perfectly. Thanks!
Generating the client for MongoDB doesn't bring enums into scope. I can manually import them and the client seems to be working fine (haven't fully tested tho).
For example:
Is this a bug?