You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
When I try to use @@unique it doesn't error and seems to be implemented in the engine but the generated code only show scalar fields.
When I use a relation as an @id or inside a @@unique as specified in these tests prisma/prisma-engines@4108df5 the generated code does not contain the relation fields in WhereUniqueInput, only scalar fields are present.
Is it a bug or is it only supported by the engine but not in the generated code?
Example with @@unique:
schema.prisma
model Company {
id String @default(uuid()) @id
name String
}
model Subside {
id String @default(uuid()) @id
company Company @relation(references: [id])
reference String
@@unique([company, reference])
}
model Company {
id String @default(uuid()) @id
name String
}
model Subside {
id String @default(uuid()) @id
company Company @relation(references: [id])
reference String
@@unique([company, reference])
}
When I try to use
@@unique
it doesn't error and seems to be implemented in the engine but the generated code only show scalar fields.When I use a relation as an
@id
or inside a@@unique
as specified in these tests prisma/prisma-engines@4108df5 the generated code does not contain the relation fields inWhereUniqueInput
, only scalar fields are present.Is it a bug or is it only supported by the engine but not in the generated code?
Example with
@@unique
:schema.prisma
Generated code
Example with
@id
:schema.prisma
Generated code doesn't contain any
findOne
,update
, ... Only operations on many objects are generated.Related to #306
The text was updated successfully, but these errors were encountered: