Hello everybody, quick question: When you specify...
# orm-help
j
Hello everybody, quick question: When you specify argument
fields
on
relation
attribute it should refer to the name of the field in the database or in the prisma schema ( if I use
@map
on some field, therefore different names in the db and 'schema.prisma' file and want to use it in
fields
) ?
Copy code
@relation(fields: [someFieldName], references: [id])
someFieldName
- field name from 'schema.prisma' or actual db field's name ? Thank you.
o
I think you refer to the Prisma schema column name.
✅ 1
r
Yup that’s what it should refer to.
j
Got it, thank you