Dear community, I need some help again. I have th...
# mongodb
d
Dear community, I need some help again. I have this field in my Prisma schema
userId String @map("user") @db.ObjectId
Now I’m trying to process this in my custom Prisma
generator
plugin, and I need access to
@map("user")
part. But I don’t see it anywhere in the schema DMMF for this field:
Copy code
{
  name: 'userId',
  kind: 'scalar',
  isList: false,
  isRequired: true,
  isUnique: false,
  isId: false,
  isReadOnly: true,
  type: 'String',
  hasDefaultValue: false,
  isGenerated: false,
  isUpdatedAt: false
}
Is this a bug or a missing feature? I need this real bad (I’m building an automated $jsonSchema generator for Mongodb out of Prisma schema) Basically I expected to see smth like
dbName: 'user'
there.
p
it seems like Prisma doesn't add mapped fields to the DMMF, searching for
_id
in
node_modules/.prisma/client/index.js
gives me nothing as well
d
Yeah, I guess I need to cut a ticket for it