Skip to content

db schema prints a Mongo field that admits several BSON types as a comma-joined word #30470

Closed

Description

@wmadden-electric

What a user sees. prisma db schema on MongoDB shows each validator property with its BSON type. A property whose validator lists several types, such as a Json field, is printed with JavaScript's default array-to-string, for example meta: object,array,string,double,int,long,bool,null.

Where. packages/2-mongo-family/9-family/src/core/schema-to-view.ts, which renders String(propDef.bsonType).

Likely fix. Render a list as object | array | string | … (or with , ), and add a test for a list-typed property and for a nullable one (['null', …]).

Where it came from. #30439, which gave Json its list of BSON types.

Activity

  1. added a commit that references this issue on Nov 12, 2026
    2407cf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions