Prisma 3.11.1stable Released Mar 24, 2022
โš ๏ธ Breaking Change Impact Score: 7/10

Prisma 3.11.1 โ€” Release Notes & Engineering Impact

Source available โ€” automated, not human-reviewed

Component: prisma ยท Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Breaking-change evidence from the source

  • Breaking: Filters no longer return `undefined` fields by default
Read the original context โ†—
Source flags breaking changes โ€” review applicability
$ npm install --save-dev --save-exact [email protected]
๐Ÿ“„ .MD
โšก Executive Summary (TL;DR)

Prisma 3.11.1. Source highlight: Today, we are issuing the `3.11.1` patch release.

Who Does This Impact? (Role-Based Analysis)

๐Ÿ’ป Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

๐Ÿ“Š Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

โš™๏ธ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

โš ๏ธ Breaking Changes & Deprecations (1)

  • Breaking: Filters no longer return `undefined` fields by default
๐Ÿ“„ View Raw Release Notes (Original Developer Log)
Today, we are issuing the `3.11.1` patch release. # MongoDB (Preview) ## Breaking: Filters no longer return `undefined` fields by default In `3.11.1`, we've changed what data is returned when filtering MongoDB documents on `undefined` fields. The new rule is that `undefined` fields are excluded by default unless explicitly filtered for. This allows you to query for undefined and null values separately. Let's take a look at a concrete example. Given the following Prisma schema: ```prisma model Address { id Int @id @map("_id") city String street String? // Note that street is optional } ``` For Mongo, optional fields can either be `null` or `undefined` (absent). The following documents are all valid for the schema above: ```ts { "_id": 1, "city": "San Fransisco", "street": "Market st." } { "_id": 2, "city": "Seattle", "street": null } { "_id": 3, "city": "Chicago" } ``` Prior to `3.11.1`, if you queried for `where: { street: null }`, you'd get `_id: 2` and `_id: 3`. In `3.11.1`, you'll only get `_id: 2`. The ability to _also_ query for the missing fields has also been added. For details, refer to the new `isSet` below to learn more. There are a few exceptions to this new default: - A `having` filter on an aggregated field *will* return `undefined` fields. This is because aggregation on undefined fields yields `null`, not `undefined`, thus matching the filter. - Filters on undefined to-many relations (e.g., the backing array of a many-to-many is `undefined`) will currently include those relations in the result set. ## New `isSet` filter operation To compensate for missing fields on documents no longer being returned by the filters above, weโ€™ve added a new `isSet: bool` filter. This filter can be used to include fields that are `undefined` on documents. Using the example above, to include the `undefined` fields, you can use an `OR`: ```ts await prisma.address.findMany({ where: { OR: [ { street: { isSet: false } }, { street: null } ] } }) ``` The `isSet` operation has been added to all scalar and embedded fields that are optional. ## New `unset` operation In `3.11.1`, you can also remove a field with the `unset` operation. Using the example above, let's write a query to remove the street field: ```ts await prisma.address.update({ where: { id: 10, }, data: { street: { unset: true, }, }, }) ``` This effectively sets the `street` field to `undefined` in the database. ## New `updateMany` operation We now support updating embedded documents that match specific criteria. For example, given the following schema: ```prisma model Product { id Int @id @map("_id") name String @unique photos Photo[] } type Photo { height Int @default(200) width Int @default(100) url String } ``` Let's update the photo with a `url` of `1.jpg` to `2.png`: ```ts const product = prisma.product.update({ where: { id: 10, }, data: { photos: { updateMany: { where: { url: '1.jpg', }, data: { url: '2.png', }, }, }, }, }) ``` ## New `deleteMany` operation Similar to `updateMany`, you can also remove embeds that match specific criteria. Using the Prisma Schema above, let's delete all photos with a `height` of 100: ```ts const product = prisma.product.update({ where: { id: 10, }, data: { photos: { deleteMany: { where: { height: 100, }, }, }, }, }) ```