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

Bug: Composite types are not generated #80

Open
rubnogueira opened this issue Aug 15, 2022 · 0 comments
Open

Bug: Composite types are not generated #80

rubnogueira opened this issue Aug 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@rubnogueira
Copy link

Bug description

I'm using MongoDB with Composite types and the generated models include the "imports" for the composite types, but no "type" file is generated.

According to their docs: Composite types are structured and typed in a similar way to [models]

https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types

To Reproduce

  • npx prisma generate
  • Regular models generated.
  • No composite type generated.

I made some tests with this lib, I noticed that options.dmmf.datamodel object from generator.ts has models, types and enums, but only models and enums are currently handled.

Prisma information

model Article {
  id               String          @id @default(auto()) @map("_id") @db.ObjectId
  test      TestType
}

type TestType {
  hello         String
}

Environment & setup

  • OS: Ubuntu 22.04
  • Database: MongoDB
  • Node.js version: 16.16.0

Prisma Version

4.2.1

@rubnogueira rubnogueira added bug Something isn't working help wanted Extra attention is needed labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants