Brandon Rice
06/10/2022, 5:27 PM_id: {$oid: 'string}
my prisma.schema has
id String @id @default(auto()) @map("_id") @db.ObjectId
but that has no affect
any thoughtsNurul
06/13/2022, 1:41 PMfindRaw
would return the docs as they are stored in the database.
Your stored documents would not have an id
field, it would have a _id
field as id field is mapped to _id by @map("_id")
attribute.
so the returned documents have a _id field and not id.
@map maps a field name or enum value from the Prisma schema to a column or document field with a different name in the database. If you do not use @map
, the Prisma field name matches the column name or document field name exactly