In case we use Polymorphism with @@map, the generated prisma schema is invalid.
Given the following zmodel:
model Foo {
//...
@@map("foos")
}
model Bar extends Foo {
@@map("bars")
}
It will generate the following prisma
model Foo {
//...
@@map("foos")
}
model Bar {
@@map("foos")
@@map("bars")
}
And will output the following validation error when generating migrations.
error: Attribute "@map" can only be defined once.