Skip to content
masterclass Buddy

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.

Subscribe
  • Prisma Schema
  • Models
  • Indexes
  • What is introspection?

Source: Database mapping (Prisma ORM v7) | Prisma Documentation. Checked 2026-11-03.