Skip to content

Generated code can't compile when schema contains delegate models without concrete models #1415

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

Closed
ymc9 opened this issue May 8, 2024 · 1 comment
Milestone

Comments

@ymc9
Copy link
Member

ymc9 commented May 8, 2024

model User {
  id    String @id @default(cuid())
  prices Price[]
}

model Price {
  id        String   @id @default(cuid())
  owner User @relation(fields: [ownerId], references: [id])
  ownerId String @default(auth().id)
  priceType    String
  @@delegate(priceType)
}
Error compiling generated code:
    node_modules/.zenstack/.logical-prisma-client/index-fixed.d.ts:2086:98 - error TS1005: '=' expected.

    2086     export type $PricePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs>;
@ymc9 ymc9 added this to the v2.1.0 milestone May 8, 2024
@ymc9
Copy link
Member Author

ymc9 commented May 13, 2024

Fixed in 2.1.0

@ymc9 ymc9 closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant