Embedded document _id
of type ObjectId
are introspected without native type @db.ObjectId
#11396
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
topic: embedded documents
topic: introspection
topic: mongodb
Milestone
Prisma 1 MongoDB supported embedded documents. A document could for example look like this:
create via this Prisma 1 schema:
This is currently introspected into this Prisma schema:
Note how
FooIds.id
is only of scalar typeString
although the data clearly shows it being$oid
, which we could probably render as@db.ObjectId
.(We are not sure where the value comes from yet, so if this deserves the
@default(dbgenerated())
as well, but suspect Prisma 1 did generate that manually and then inserted the value - as_id
usually does not really exist for embedded types afaik.)The text was updated successfully, but these errors were encountered: