[ClientExtensions, TypeScript] Fields of custom type aren't available when using the ClientExtensions preview-feature, unless select
'd explicitly.
#17388
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
tech/typescript
Issue for tech TypeScript.
topic: client types
Types in Prisma Client
topic: clientExtensions
topic: composite-types
topic: mongodb
Milestone
Bug description
Only when the
clientExtensions
preview-feature is enabled (just by enabling it, no need to define custom extensions), fields of a user-defined customtype
aren't available after querying the model, unlessselect
'd explicitly.Note: They are available at runtime, only TypeScript doesn't have them, I'm using the MongoDB as the db
provider
. Also, might be related to #17349, but not sure.How to reproduce
Simply create a Prisma
model
that has one or more fields of an user-definedtype
. That field won't be available (TypeScript's types only, it is available at runtime) unless it was explicitlyselect
d. Full example shown below.Expected behavior
Every field (TypeScript) should be available after executing a query, including the ones of custom types. Just like it is when not using the
clientExtensions
preview-feature.Prisma information
schema.prisma
Using the prisma client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: