Prisma · Concept
@map
Prisma mapping attributes connect friendly schema and Client names to existing database names. Use @map for fields and enum values, and @@map for models and enums.
Last updated
Syntax
fieldName Type @map("database_field")
model ModelName {
@@map("database_table")
}
enum EnumName {
VALUE @map("database_value")
@@map("database_enum")
}In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Prisma SchemaModelsIndexesWhat is introspection?