How can I create a field that starts with undersco...
# orm-help
g
How can I create a field that starts with underscore (
_
) in prisma schema? Currently it throws an error saying that it is invalid field
✅ 1
n
Hey Geebrox 👋 Here are the naming conventions of field names in prisma schema which prevents names from starting with an underscore(_) You could use
@map
to map a field name to the underlying database. Example: Column in the database would be
_firstName
in this case
Copy code
model User {
  id        Int    @id @default(autoincrement())
  firstName String @map("_firstName")
}