File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ import { loadModelWithError } from '@zenstackhq/testtools' ;
2+
3+ describe ( 'issue 1758' , ( ) => {
4+ it ( 'regression' , async ( ) => {
5+ await expect (
6+ loadModelWithError (
7+ `
8+ model Organization {
9+ id String @id @default(cuid())
10+ contents Content[] @relation("OrganizationContents")
11+ }
12+
13+ model Content {
14+ id String @id @default(cuid())
15+ contentType String
16+ organization Organization @relation("OrganizationContents", fields: [organizationId], references: [id])
17+ organizationId String
18+ @@delegate(contentType)
19+ }
20+
21+ model Store extends Content {
22+ name String
23+ @@unique([organizationId, name])
24+ }
25+ `
26+ )
27+ ) . resolves . toContain ( 'Cannot use fields inherited from a polymorphic base model in `@@unique`' ) ;
28+ } ) ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments