Skip to content

Prisma-Client generator does not include Join information on Model #27746

@quinnjr

Description

@quinnjr

Bug description

We currently have a monorepo with Angular/NestJS that is using Prisma models both in the frontend and backend to coordinate the sharing of DTO information without blowing up the backend/frontend with a bunch of DTO classes.

However, when moving over to testing the new Prisma client generator, we found that non of our relationships are exported off the *Model interface. Instead, we've needed to create additional models interfaces that represent these relationships.

We'd really prefer it if the *Model just included the relationships between the different models in the database (and the Prisma scheme).

Severity

🔹 Minor: Unexpected behavior, but does not block development

Reproduction

Expected vs. Actual Behavior

Expect the Model relationships to be auto-generated by Prisma.

Frequency

Consistently reproducible

Does this occur in development or production?

Only in development (e.g., CLI tools, migrations, Prisma Studio)

Is this a regression?

Yes, this behavior was not present in the prisma-js generator.

Workaround

Using the old generator or creating custom models works.

Prisma Schema & Queries

// Add relevant schema.prisma snippet
// Add relevant Prisma Client query

Prisma Config

// Add your `prisma.config.ts`

Logs & Debug Info

// Debug logs here

Environment & Setup

  • OS:
  • Database:
  • Node.js version:

Prisma Version

// Prisma version output

prisma : 6.12.0
@prisma/client : 6.12.0
Computed binaryTarget : debian-openssl-3.0.x
Operating System : linux
Architecture : x64
Node.js : v22.13.1
TypeScript : 5.8.3
Query Engine (Node-API) : libquery-engine 8047c96bbd92db98a2abc7c9323ce77c02c89dbc (at node_modules/.pnpm/@prisma[email protected]/node_modules/@prisma/engines/libquery_engine-debian-openssl-3.0.x.so.node)
PSL : @prisma/prisma-schema-wasm 6.12.0-15.8047c96bbd92db98a2abc7c9323ce77c02c89dbc
Schema Engine : schema-engine-cli 8047c96bbd92db98a2abc7c9323ce77c02c89dbc (at node_modules/.pnpm/@prisma[email protected]/node_modules/@prisma/engines/schema-engine-debian-openssl-3.0.x)
Default Engines Hash : 8047c96bbd92db98a2abc7c9323ce77c02c89dbc
Studio : 0.511.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions